This is a flexible, and generic node.js/express template which covers most basic to advance needs of modern REST APIS.
The template comes with the following dependencies defined:
compression
-https://github.com/expressjs/compression#readme
cors
-https://github.com/expressjs/cors#readme
dotenv
-https://github.com/motdotla/dotenv#readme
helmet
-https://helmetjs.github.io/
mongoDB
-https://www.mongodb.com/
mongoose
-https://mongoosejs.com/
morgan
-https://github.com/expressjs/morgan#readme
winston
-https://github.com/winstonjs/winston#readme
eslint
-https://eslint.org/
nodemon
-https://github.com/remy/nodemon
chai
-http://chaijs.com/
mocha
-https://mochajs.org/
nyc
-https://istanbul.js.org/
proxyquire
-https://github.com/thlorenz/proxyquire#readme
sinon
-https://sinonjs.org/
-
Install dependencies.
npm i
-
create the following environment variables:
NODE_ENV
: specifies the working environmentAPP_PORT
: Sets a default app port.APP_DB_URI
: Sets a default Mongo DB connection URI.
-
Be awesome.
ISC
-https://www.isc.org/licenses/