Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuelnovaes/vue-stack
Minimalistic Boilerplate for FullStack Express and Vue.js applications
https://github.com/samuelnovaes/vue-stack
axios boilerplate express fullstack mevn node nodejs nuxt server stack vue vuejs vuetify
Last synced: 4 days ago
JSON representation
Minimalistic Boilerplate for FullStack Express and Vue.js applications
- Host: GitHub
- URL: https://github.com/samuelnovaes/vue-stack
- Owner: samuelnovaes
- Created: 2017-09-05T21:10:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-20T15:12:27.000Z (over 5 years ago)
- Last Synced: 2024-10-13T12:33:29.172Z (24 days ago)
- Topics: axios, boilerplate, express, fullstack, mevn, node, nodejs, nuxt, server, stack, vue, vuejs, vuetify
- Language: JavaScript
- Homepage:
- Size: 1.82 MB
- Stars: 26
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-stack
Minimalistic Boilerplate for FullStack Express and Vue.js applications with PWA support.> To understand how this boilerplate works, see the [Nuxt.js documentation](https://nuxtjs.org).
## Installation
```sh
git clone https://github.com/samuelnovaes/vue-stack.git
cd vue-stack
npm install
npm run dev
```## Express API (With hot reload in dev mode!)
There is a `api` directory with the Express API. Each route is mapped to `/api`.
> `BodyParser` is included by default.### Example
api/index.js
```javascript
const router = require('express').Router()// GET /api/greeting
router.get('/greeting', (req, res) => {
console.log('Hello World!')
})module.exports = router
```## Index.js file
The index.js file is responsible for starting the Express application. The `vueStack(app, port)` function starts the application on a specific port.
```javascript
const express = require('express')
const vueStack = require('./vue-stack')
const app = express()vueStack(app, process.env.PORT || 3000)
```The `vueStack` function returns a Promise.
## PWA
By default, Vue Stack generates a PWA application en production mode. You can customize its manifest and icons in nuxt.config.js
## Commands
Command | Description
--- | ---
npm run dev | Launch a development server on localhost:3000 with hot-reloading.
npm run build | Build your application with webpack and minify the JS & CSS (for production).
npm start | Start the server in production mode (after running nuxt build).
npm run generate | Build the application and generate every route as a HTML file (used for static hosting).## Using Docker
```
# docker build -t [IMAGE_NAME] .
# docker run -d --name [CONTAINER_NAME] -p [PORT]:3000 [IMAGE_NAME]
```## See more
- [Node.js](https://nodejs.org)
- [ExpressJS](http://expressjs.com)
- [Vue.js](http://vuejs.org)
- [Nuxt.js](https://nuxtjs.org)
- [Nuxt PWA](https://pwa.nuxtjs.org)