Just another ES6 expressjs + bookshelf boilerplate
- Initially just for APIs but you can add 'views' easily
- ES6 support via babel
- Vagrant with PostgreSQL: just for test purpose, if you have other database supported by Bookshelf please change the Database Configuration
- Useful middlewares
- Ember like structure. Just begin with app/app.js
- Independent Business Core from API Layer
- i18n support (english and spanish)
- API with:
- Security by Passport and passport-jwt
- Preconfigured routes signup, activate account, login, change password, forgot password, reset password and a demo path for 'users'
- Emails not included but you can add them here
- Preconfigured npm commands:
- db:create [migration file name]: create a new db migration file
- db:migrate : run pending migrations
- db:rollback : rollback the last migration
- db:create:seed [seed file name]: create a seed file
- db:seed : run the seeds
- Ember client
You will need the following things properly installed on your computer.
git clone git@github.com:dolcalmi/coquito-express.git
- change into the new directory
rm -rf .git && git init && npm init
(optional, make it yours)npm install
vagrant up
(may take a while)npm run db:migrate
npm run db:seed
(create an active user john.doe@gmail.com with password 123456)
npm start
- Visit your app at http://localhost:3000/v1.
- Also, you can test it using Postman json (MyApp.Postman.json) or Ember client for Coquito Express
- Update your database connection in config/database.js
npm run build
(compiles with babel and move all to dist folder)- deploy dist folder and run
NODE_ENV=production node dist/bin/www.js
or NODE_ENV=production npm run serve