/node-api-template

nodejs api server template using expressjs

Primary LanguageJavaScriptMIT LicenseMIT

node-api-template

Basic template for starting a new expressjs json API server.

File Tree

.
├── index.js
├── LICENSE
├── middleware.js
├── package.json
├── README.md
├── routes
│   └── index.js
└── test
    └── api.test.js

Development Features & Code Testing

  • Supertest
  • ESLint
  • Mocha
  • Nodemon

Expansion

  • JWT with bcrypt
  • Database
  • Schema
  • Input Validation
  • Routes for signup, auth etc
  • Swagger json api documentation

Additional Packages

Some additional packages which may be of use:

Boom - HTTP-friendly error objects
Passport - Authentication (Supports OAuth & OpenID)
Mongoose - Mongodb with schemas
Sequelize - ORM for Postgres, MySQL, SQLite
Winston - Logging to files (not needed if logging on reverse proxy)
Bcrypt, Jsonwebtoken, Validator, Joi

Useful Tools