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.6.4 to 0.6.5

13

bin/index.js

@@ -23,2 +23,8 @@ #!/usr/bin/env node

}
// Disable for the moment...
// host: {
// alias: 'H',
// description: 'Set host',
// default: 'localhost'
// }
})

@@ -34,7 +40,7 @@ .example('$0 db.json', '')

for (var prop in object) {
console.log(chalk.grey(' http://localhost:' + port + '/') + chalk.cyan(prop))
console.log(chalk.grey(' http://' + host + ':' + port + '/') + chalk.cyan(prop))
}
console.log(
'\nYou can now go to ' + chalk.grey('http://localhost:' + port + '/\n')
'\nYou can now go to ' + chalk.grey('http://' + host + ':' + port + '/\n')
)

@@ -70,2 +76,3 @@

var port = process.env.PORT || argv.port
var host = 'localhost' //process.env.HOST || argv.host

@@ -93,2 +100,2 @@ // Say hi, load file and start server

})
}
}
{
"name": "json-server",
"version": "0.6.4",
"version": "0.6.5",
"description": "Serves JSON files through REST routes.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -155,5 +155,8 @@ # JSON Server [![Build Status](https://travis-ci.org/typicode/json-server.svg)](https://travis-ci.org/typicode/json-server) [![NPM version](https://badge.fury.io/js/json-server.svg)](http://badge.fury.io/js/json-server)

### Video
* [Creating Demo APIs with json-server on egghead.io](https://egghead.io/lessons/nodejs-creating-demo-apis-with-json-server)
### Articles
* [Creating Demo APIs with json-server on egghead.io](https://egghead.io/lessons/nodejs-creating-demo-apis-with-json-server)
* [Fast prototyping using Restangular and Json-server](http://glebbahmutov.com/blog/fast-prototyping-restangular-and-json-server/)

@@ -160,0 +163,0 @@ * [ng-admin: Add an AngularJS admin GUI to any RESTful API](http://marmelab.com/blog/2014/09/15/easy-backend-for-your-restful-api.html)

@@ -12,7 +12,8 @@ var fs = require('fs')

// Don't use logger if json-server is mounted
if (!module.parent) {
server.use(logger('dev'))
}
// Logger
server.use(logger('dev', {
skip: function(req, res) { return req.path === '/favicon.ico' }
}))
// Beautify JSON
server.set('json spaces', 2)

@@ -19,0 +20,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