vue-express-mongo-boilerplate
v0.9.0
Published
Express NodeJS application server boilerplate with Mongo and VueJS
Downloads
23
Maintainers
Readme
vue-express-mongo-boilerplate
This project is under heavy development!!!
This is a VueJS webapp boilerplate project with ExpressJS + Mongo server. Not an out-of-box webapp.
Inspired by dstroot/skeleton and sahat/hackathon-starter
This is just my personal boilerplate, it may or may not be a good fit for your project(s).
If you like my work, please donate. Thank you!
Live Demo (login: test/test1234)
Features
Server-side
- [x] Node.JS v6.x.x
- [x] Express
- [x] MongoDB with Mongoose
- [x] NodeMailer with SMTP, MailGun or SendGrid
- [x] Helmet
- [x] Express-validator
- [x] winston + 6 transports
- [x] GraphQL with Apollo stack
- [x] i18next as the internationalization ecosystem
- [x] HTTP/2 Server Push with netjet
- [x] Bundled server-side code with Webpack 2
Client-side
- [x] VueJS 2.x
- [x] Vuex
- [x] Vue-router
- [x] axios
- [x] socket.io connection with namespaces & authorization
- [x] vue-websocket
- [x] Jade
- [x] Webpack 2
- [x] SCSS
- [x] PostCSS with precss and autoprefixer
- [x] Babel
- [x] Passwordless mode
- [x] Passport.JS
- Social signup/login with Facebook, Google, Twitter and Github
- API key authentication for REST API calls
- [x] Toastr
- [x] vue-form-generator
Supported remote logging services
- [x] Papertrail
- [x] Graylog
- [x] LogEntries
- [x] Loggly
- [x] Logsene
- [x] Logz.io
Usage
Install dependencies
$ npm install
or
yarn
For development
$ npm run dev
Build web app scripts and styles:
$ npm run build
For production
$ npm start
Screenshots
Login screen
Index page after login
Devices page
Directory structure
+---build
+---client
| +---app
| | +---core
| | +---modules
| | +---demo
| | +---devices
| | +---home
| | +---posts
| | +---session
| |
| +---frontend
| +---images
| +---scss
|
+---data
+---logs
+---server
| | bundle.js
| | dev.js
| | index.js
| +---applogic
| | +---libs
| | +---modules
| | +---counter
| | +---devices
| | +---posts
| | +---session
| +---config
| | default.js
| | index.js
| | prod.js
| | test.js
| |
| +---core
| +---libs
| +---locales
| | +---en
| | +---hu
| +---models
| | user.js
| +---public
| +---routes
| +---schema
| +---services
| +---views
+---tests
|
| package.json
| secrets.json
Bundled server-side
If you want to bundle your NodeJS server-side code run webpack on server code with npm run build && npm run build:server
command. It if was success, run the server: npm run start:bundle
If you want to export bundled version copy these folders & files to the new place:
- server
- locales
- public
- views
- bundle.js
- package.json
- config.js (optional)
Before start, you have to install production dependencies with npm: npm install --production
Obtaining API keys for social signup/login
Note: After a successful sign in with Facebook, a user will be redirected back to home page with appended hash #_=_
in the URL. It is not a bug. See this Stack Overflow discussion for ways to handle it.
License
vue-express-mongo-boilerplate is available under the MIT license.
Contact
Copyright (C) 2016 Icebob