Skip to content

Latest commit

 

History

History
75 lines (57 loc) · 1.24 KB

README.md

File metadata and controls

75 lines (57 loc) · 1.24 KB

Express & sequelize REST API Boilerplate in ES7

Getting Started

Clone the repo:

git clone git@github.com:pedrobarrostech/express-sequelize-es7-rest-api.git
cd express-sequelize-es7-rest-api

Install yarn:

npm install -g yarn

Install dependencies:

yarn

Start server:

# Start server
yarn start

# Selectively set DEBUG env var to get logs
DEBUG=express-sequelize-es7-rest-api:* yarn start

Refer debug to know how to selectively turn on logs.

Tests:

# Run tests written in ES6 along with code coverage
yarn test

# Run tests on file change
yarn test:watch

# Run tests enforcing code coverage (configured via .istanbul.yml)
yarn test:check-coverage

Lint:

# Lint code with ESLint
yarn lint

# Run lint on any file change
yarn lint:watch

Other gulp tasks:

# Wipe out dist and coverage directory
gulp clean

# Default task: Wipes out dist and coverage directory. Compiles using babel.
gulp
Deployment
# compile to ES5
1. yarn build

# upload dist/ to your server
2. scp -rp dist/ user@dest:/path

# install production dependencies only
3. yarn --production

# Use any process manager to start your services
4. pm2 start dist/index.js