Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanoff committed Oct 18, 2018
1 parent 8931ff3 commit e8d5cd5
Show file tree
Hide file tree
Showing 7 changed files with 1,182 additions and 162 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ node_js:
- "4"
- "5"
- "6"
- "7"
- "8"
- "9"
- "10"
after_script: NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
- link to second model can be defined before initialization of second model


## [4.2.1](https://github.com/ivanoff/create-rest-api/tree/4.2.1) (2017-08-25)
[Full Changelog](https://github.com/ivanoff/create-rest-api/compare/4.1.3...4.2.1)

**What Was Done:**

- link to second model can be defined before initialization of second model


## [4.1.3](https://github.com/ivanoff/create-rest-api/tree/4.1.3) (2017-08-22)
[Full Changelog](https://github.com/ivanoff/create-rest-api/compare/3.0.1...4.1.3)

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

### Create your REST API from scarch

- [Dependencies](#dependencies)

- [Instalation](#instalation)

Expand All @@ -33,6 +34,13 @@
- [Change Log](CHANGELOG.md)


## Dependencies

- Node.js v.4.0 or higher

- MongoDB


## Instalation

```npm install --save create-rest-api```
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ environment:
- nodejs_version: "5"
- nodejs_version: "6"
- nodejs_version: "7"
- nodejs_version: "8"
- nodejs_version: "9"
- nodejs_version: "10"

# Install scripts. (runs after repo cloning)
install:
Expand Down
9 changes: 4 additions & 5 deletions lib/server.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
'use strict';
var Express = require('express');
var bodyParser = require('body-parser');
var jwt = require('jsonwebtoken');

module.exports = function () {

var Express = require('express');
var bodyParser = require('body-parser');
var jwt = require('jsonwebtoken');

var app = new Express();

app.use(bodyParser.json());
Expand Down Expand Up @@ -136,6 +134,7 @@ module.exports = function () {
log.debug('%s model registered', name);

if (model) app._relationsStored.push([name, model]);
return this;
};

app.registerModel = function (name, model) {
Expand Down
Loading

0 comments on commit e8d5cd5

Please sign in to comment.