Skip to content

brandon-segal/incline-backend

 
 

Repository files navigation

Node Project Template

An example Express project with the following features:

  • Authentication and Session Storage via passport
  • Data persistence with MongoDB using the Mongoose ODM
  • Example CRUD HTTP endpoints
  • Code coverage, unit tests and documentation

Requirements

  • Node.js: 6.9.1 LTS or greater is required
  • MongoDB: 3.2.10 or greater is required

Dependencies

npm install To install the following:

Dependencies

  • bcrypt - Lib to help you hash passwords
  • body-parser - Parses incoming request bodies
  • connect-mongo - MongoDB session store for Express and Connect
  • dotenv - Shim to load environment variables from .env into ENV
  • express - Web application framework for Node.js
  • express-session - Session middleware for express
  • helmet - Secure Express apps with various HTTP headers
  • locreq - Local Require - use relative paths with require for unit tests
  • passport - Authentication framework for Node.js
  • mongoose - Object Document Mapper (ODM) for MongoDB

Development Dependencies

  • aglio - An API Blueprint renderer with theme support that outputs static HTML
  • chai - Chai is a BDD / TDD assertion library
  • istanbul - A Javascript code coverage tool
  • mocha - Simple, flexible, fun javascript test framework for node.js
  • nsp - Node security platform, check for known vulnerabilities
  • sinon - Standalone test spies, stubs and mocks for JavaScript

Documentation

Documentation is generated via aglio using the API Blueprint Markdown format. Generated documentation can be found in the out directory. When the application is run in development mode (NODE_ENV="development" npm start) the documentation will be served at http://localhost:7000/doc.

Test

Security and dependency vulnerability scanning is done via Node Security Project. Unit testing is performed by Mocha.

Run tests with npm test

Run code coverage reports with npm run coverage code coverage reports can be found in the 'coverage' directory.

Run

Configure the environmental parameters via the .env file or config them via the command line when running. Run the application with npm start or with optional parameters PORT=7001 NODE_ENV=development npm start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%