Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nulldev/rest-api-boilerplate
:satellite: ExpressJS Based REST API Boilerplate
https://github.com/nulldev/rest-api-boilerplate
api boilerplate expressjs nodejs rest-api restful server
Last synced: 24 days ago
JSON representation
:satellite: ExpressJS Based REST API Boilerplate
- Host: GitHub
- URL: https://github.com/nulldev/rest-api-boilerplate
- Owner: NullDev
- License: mit
- Created: 2019-03-14T19:14:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-01T21:51:18.000Z (over 1 year ago)
- Last Synced: 2023-06-01T22:28:23.645Z (over 1 year ago)
- Topics: api, boilerplate, expressjs, nodejs, rest-api, restful, server
- Language: JavaScript
- Homepage:
- Size: 383 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# REST API Boilerplate
An ExpressJS based REST API Boilerplate
## :wrench: Setup
0. Open up your favourite terminal (and navigate somewhere you want to download the repository to)
1. Make sure you have NodeJS installed. Test by entering
$ `node -v`
If this returns a version number, NodeJS is installed. **If not**, get NodeJS here.
2. Clone the repository and navigate to it. If you have Git installed, type
$ `git clone https://github.com/NullDev/REST-API-Boilerplate.git && cd REST-API-Boilerplate`
If not, download it here and extract the ZIP file.
Then navigate to the folder.
3. Install all dependencies by typing
$ `npm install`
4. Copy `config.template.js` and paste it as `config.js`
5. Configure it in your favourite editor by editing `config.json`
6. Start it by running
$ `npm start`**Note:** You also need *cross-env* ($ `sudo npm i -g cross-env`) globally installed as well as *eslint* ($ `sudo npm i -g eslint`) for testing.
## :diamond_shape_with_a_dot_inside: Features
- Easy API versioning (/v1/, /v2/)
- Adding routes without touching the init script (app.js)
- Configurable Rate Limiting
- Robots.txt generator
- Error handling
- Logger
- Production ready memory store for Ratelimiter
- Standard route scheme
- Support for multiple routers
- Route walker to display which route registered with what method