Skip to content

Commit

Permalink
Merge 8149ae5 into 9ac119d
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalkapadia committed Oct 26, 2016
2 parents 9ac119d + 8149ae5 commit b0056ff
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ npm install

Start server:
```sh
# set DEBUG env variable to get debug logs
# Start server
npm start

# Selectively set DEBUG env var to get logs
DEBUG=express-mongoose-es6-rest-api:* npm start
# OR
# requires gulp to be installed globally
npm i -g gulp
gulp serve
```
Refer [debug](https://www.npmjs.com/package/debug) to know how to selectively turn on logs.


Execute tests:
Tests:
```sh
# Run tests written in ES6 along with code coverage
npm test
Expand All @@ -71,14 +72,19 @@ npm run test:watch
npm run test:check-coverage
```

Other gulp tasks:
Lint:
```sh
# Wipe out dist and coverage directory
gulp clean

# Lint code with ESLint
npm run lint

# Run lint on any file change
npm run lint:watch
```

Other gulp tasks:
```sh
# Wipe out dist and coverage directory
gulp clean

# Default task: Wipes out dist and coverage directory. Compiles using babel.
gulp
Expand All @@ -88,7 +94,7 @@ gulp

```sh
# compile to ES5
1. npm run build or gulp
1. npm run build

# upload dist/ to your server
2. scp -rp dist/ user@dest:/path
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Promise from 'bluebird';
import mongoose from 'mongoose';
import util from 'util';
import config from './config/env';
import app from './config/express';

const debug = require('debug')('express-mongoose-es6-rest-api:index');

// make bluebird default Promise
Promise = require('bluebird'); // eslint-disable-line no-global-assign

// plugin bluebird promise in mongoose
mongoose.Promise = Promise;

Expand Down

0 comments on commit b0056ff

Please sign in to comment.