Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/developit/express-es6-rest-api
:battery: Starter project for an ES6 RESTful Express API.
https://github.com/developit/express-es6-rest-api
api boilerplate cors es2015 es6 express javascript mongoose
Last synced: 7 days ago
JSON representation
:battery: Starter project for an ES6 RESTful Express API.
- Host: GitHub
- URL: https://github.com/developit/express-es6-rest-api
- Owner: developit
- License: mit
- Created: 2015-03-23T15:43:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T08:26:54.000Z (over 1 year ago)
- Last Synced: 2024-11-28T10:06:43.604Z (14 days ago)
- Topics: api, boilerplate, cors, es2015, es6, express, javascript, mongoose
- Language: JavaScript
- Homepage: http://git.io/express-es6-rest-api
- Size: 22.5 KB
- Stars: 2,462
- Watchers: 68
- Forks: 552
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - express-es6-rest-api
README
Express & ES6 REST API Boilerplate
==================================This is a straightforward boilerplate for building REST APIs with ES6 and Express.
- ES6 support via [babel](https://babeljs.io)
- REST resources as middleware via [resource-router-middleware](https://github.com/developit/resource-router-middleware)
- CORS support via [cors](https://github.com/troygoode/node-cors)
- Body Parsing via [body-parser](https://github.com/expressjs/body-parser)> Tip: If you are using [Mongoose](https://github.com/Automattic/mongoose), you can automatically expose your Models as REST resources using [restful-mongoose](https://git.io/restful-mongoose).
Getting Started
---------------```sh
# clone it
git clone [email protected]:developit/express-es6-rest-api.git
cd express-es6-rest-api# Make it your own
rm -rf .git && git init && npm init# Install dependencies
npm install# Start development live-reload server
PORT=8080 npm run dev# Start production server:
PORT=8080 npm start
```
Docker Support
------
```sh
cd express-es6-rest-api# Build your docker
docker build -t es6/api-service .
# ^ ^ ^
# tag tag name Dockerfile location# run your docker
docker run -p 8080:8080 es6/api-service
# ^ ^
# bind the port container tag
# to your host
# machine port```
License
-------MIT