|
1 | 1 | # express-es6-rest-api-starter |
2 | 2 | Starter project for an ES6 RESTful Express API. |
| 3 | + |
| 4 | +# [(https://cloud.githubusercontent.com/assets/4172932/12559828/4a17edca-c3bd-11e5-815c-0e24534b5715.jpg)](https://github.com/KunalKapadia/express-es6-rest-api-starter) |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +This is a boilerplate for building REST APIs with ES6 and Express. Helps you stay productive by following best practices. Follows [Airbnb's Javascript style guide](https://github.com/airbnb/javascript). |
| 9 | + |
| 10 | +### Features |
| 11 | + |
| 12 | +| Feature | Summary | |
| 13 | +|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 14 | +| ES2015 via Babel | ES2015 support using [Babel](https://babeljs.io/). | |
| 15 | +| Code Linting | JavaScript code linting is done using [ESLint](http://eslint.org) - a pluggable linter tool for identifying and reporting on patterns in JavaScript. Uses ESLint with [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb), which tries to follow the Airbnb JavaScript style guide. | |
| 16 | +| Auto server restart | Restart the server using [nodemon](https://github.com/remy/nodemon) in real-time anytime an edit is made, with babel compilation. | |
| 17 | +| Environment variables | Supports setting env variable using .env file at the root. Uses [dot-env](https://www.npmjs.com/package/dotenv) to enable this feature.) | |
| 18 | + |
| 19 | +## Getting Started |
| 20 | + |
| 21 | +``` |
| 22 | +# clone it |
| 23 | +git clone [email protected]:KunalKapadia/express-es6-rest-api-starter.git |
| 24 | +cd express-es6-rest-api-starter |
| 25 | +npm install |
| 26 | +
|
| 27 | +# Make it your own |
| 28 | +rm -rf .git && git init && npm init |
| 29 | +
|
| 30 | +# Set environment variables if required |
| 31 | +# Create .env file at the root path |
| 32 | +NODE_ENV=development |
| 33 | +HTTP_PORT=3000 |
| 34 | +
|
| 35 | +# start server |
| 36 | +npm start or gulp serve (requires gulp to be installed globally) |
| 37 | +``` |
| 38 | + |
| 39 | +## Deploy to Heroku |
| 40 | + |
| 41 | +Coming soon. |
| 42 | + |
| 43 | +## A Boilerplate-only Option |
| 44 | + |
| 45 | +If you would prefer not to use any of our tooling, delete the following files from the project: `package.json`, `gulpfile.babel.js`, `.eslintrc` and `.travis.yml`. You can now safely use the boilerplate with an alternative build-system or no build-system at all if you choose. |
| 46 | + |
| 47 | +## Docs and Recipes |
| 48 | + |
| 49 | +* [Gulp recipes](https://github.com/gulpjs/gulp/tree/master/docs/recipes) - the official Gulp recipes directory includes a comprehensive list of guides for different workflows you can add to your project. |
| 50 | + |
| 51 | +## Contributing |
| 52 | + |
| 53 | +Contributions, questions and comments are all welcome and encouraged. For code contributions submit a pull request with unit test. |
0 commit comments