json-server
Advanced tools
Comparing version 0.7.10 to 0.7.11
{ | ||
"name": "json-server", | ||
"version": "0.7.10", | ||
"version": "0.7.11", | ||
"description": "Serves JSON files through REST routes.", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -5,6 +5,6 @@ # JSON Server [![](https://travis-ci.org/typicode/json-server.svg)](https://travis-ci.org/typicode/json-server) [![](https://badge.fury.io/js/json-server.svg)](http://badge.fury.io/js/json-server) [![](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/typicode/json-server?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
Created with :sparkling_heart: for front-end developers who need a quick back-end for prototyping and mocking. | ||
Created with <3 for front-end developers who need a quick back-end for prototyping and mocking. | ||
* [Egghead.io free video tutorial - Creating demo APIs with json-server](https://egghead.io/lessons/nodejs-creating-demo-apis-with-json-server) | ||
* [JSONPlaceholder - Live running version](http://jsonplaceholder.typicode.com) | ||
* [Online video tutorial - Creating demo APIs with json-server](https://egghead.io/lessons/nodejs-creating-demo-apis-with-json-server) | ||
@@ -11,0 +11,0 @@ ## Example |
@@ -156,6 +156,8 @@ var express = require('express') | ||
// Embed other resources based on resource id | ||
_embed.forEach(function () { | ||
var query = {} | ||
query[req.params.resource + 'Id'] = req.params.id | ||
resource[_embed] = db(_embed).where(query) | ||
_embed.forEach(function (otherResource) { | ||
if (otherResource && otherResource.trim().length > 0) { | ||
var query = {} | ||
query[req.params.resource + 'Id'] = req.params.id | ||
resource[otherResource] = db(otherResource).where(query) | ||
} | ||
}) | ||
@@ -162,0 +164,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34467
796