Socket
Socket
Sign inDemoInstall

json-server

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-server - npm Package Compare versions

Comparing version 0.7.10 to 0.7.11

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc