iqrasarwar / node-express-es6-airbnb

Boilerplate to creates node.js API with ES6 Transpiler and airbnb rules configured to eslint.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-express-es6-airbnb

node-express-es6-airbnb is a project that provides you with a boilerplate tool to create a node.js API with an ES6 transpiler while following the Airbnb's Javascript (ES6) Style Guide.

Features

  • Simple /api/ endpoint that provides you a JSON object {hi: 'there'}.
  • Simple /api/_health endpoint to check the status of the API.
  • Simple /api/demo endpoint that makes use of a router and controllers to return a JSON object {hello: 'world'}.
  • All code following Airbnb's Javascript (ES6) style guide.
  • Create deployment build with $ npm run build.
  • Pre-commit script to prevent commit files that could break your app in production.
  • /docs endpoint with the API documentation for external users

Components

Getting start

Just run the following commands in your terminal to start coding

$ git clone https://github.com/yoniihdc/node-express-es6-airbnb
$ cd node-express-es6-airbnb
$ npm install

You'll need to create the /src/config/dev.js file following the values specified in /src/config/dev.js.sample.

Then run:

$ npm run dev

The last command automatically runs the API exposed on http://localhost:3005.

Deployment

To create a build for production you need to build your current project with the following command: $ npm run build

Then copy all files inside /dist folder and put all of them in your server.

Contributing

This project is an initiative to make the way you create an API easier. Feel free to propose new things and changes that help us with this task. You can read our CONTRIBUTE.md for more information.

About

Boilerplate to creates node.js API with ES6 Transpiler and airbnb rules configured to eslint.


Languages

Language:JavaScript 100.0%