A DevInterface Express.js boilerplate app.
This boilerplate sets up a starter application with built in authorization, authentication (email, Facebook, password forget) and internationalization.
master
branch is based on Bookshelf
ORM. Please check out the sequelize
branch to see the same boilerplate with Sequelize
ORM
Setup a PostgreSQL 9.6 database with following extensions:
- pgcrypto
- uuid-ossp
- postgis
cp .env.example .env
npm install
npm run db:install
gem install mailcatcher
npm run dev (or npm run debug)
and in an other window
mailcatcher
Go to http://localhost:1080/; Send mail through smtp://localhost:1025)
npm run compile
npm run start
npm run test
Linting is performed through standardjs
. Just open a console and type
npm run linter
http://localhost:3000/:lang (GET)
http://localhost:3000/:lang/login (GET,POST)
http://localhost:3000/:lang/logout (GET)
http://localhost:3000/:lang/signup (GET,POST)
http://localhost:3000/:lang/forgot (GET,POST)
http://localhost:3000/:lang/reset/:token (GET,POST)
http://localhost:3000/:lang/users/ (GET)
http://localhost:3000/:lang/users/:id (GET)
http://localhost:3000/auth/facebook (POST)
http://localhost:3000/auth/facebook/unlink (GET))
http://localhost:3000/auth/facebook/callback (GET)
http://localhost:3000/api/v1/examples (GET, POST)ì
http://localhost:3000/api/v1/examples/:id (GET)
http://localhost:3000/api/v1/users (GET)
http://localhost:3000/api/v1/users/:id (GET)
- authentication via
Passport
- authorization via
CanCan
- mail with
nodemailer
- i18n via
i18n-node
- logging via
Pino
- ORM via
Bookshelf
(Knex) - flash messages via
express-flash-2
- input validation via
express-validator
- templating via
Pug
- stylesheets via
Sass
- environment variables via
dotenv
The boilerplate has a minimal testing scenario but it is really untested :-(