Socket
Book a DemoInstallSign in
Socket

json-file-stub-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-file-stub-api

Simple CLI tool for serving out static files and a fake API from JSON files

0.1.0
latest
npmnpm
Version published
Maintainers
1
Created
Source

JSON File Stub API Tool

Silly CLI tool for serving out static files and a static "API".

Usage

Install the tool using npm install --save-dev or whichever is your preferred method of installation.

If you install the tool to your node_modules, make sure to add ./node_modules/.bin to your $PATH.

Run the tool like this, specifying the statics folder first (e.g. dist/) and the routes folder last (e.g. routes)

$ json-file-stub-api dist/ routes/
route:  /routes
route:  /routes/other
we listenin 4 u @ 3000

$ curl -X GET localhost:3000/
sdfsdffds
$ curl -X GET localhost:3000/routes
123mybagel
$ curl -X GET localhost:3000/routes/other
765muteki

FAQs

Package last updated on 26 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.