https://github.com/dennislo/express-rest-api
Starter project for an ES6 RESTful Express API.
https://github.com/dennislo/express-rest-api
api boilerplate cors es6 express javascript
Last synced: 3 months ago
JSON representation
Starter project for an ES6 RESTful Express API.
- Host: GitHub
- URL: https://github.com/dennislo/express-rest-api
- Owner: dennislo
- License: mit
- Created: 2018-02-07T19:13:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-11T18:35:42.000Z (over 8 years ago)
- Last Synced: 2025-07-01T01:44:47.352Z (12 months ago)
- Topics: api, boilerplate, cors, es6, express, javascript
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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)
- 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 git@github.com: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