Skip to content

plusk-dev/json-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Server

An tiny CLI to load data from a JSON File during development.


After installing json-server by

pip install json_server

You can run

json_server <path-to-JSON-file> <port:optional>

The port argument defaults to 5000

This shall output:

 * Serving Flask app 'json_server.main' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 816-527-262
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Which is similar to what a standard Flask app logs.

Now that you have run the command, http://127.0.0.1:<port>/ shall respond with your JSON.

About

An tiny CLI to load mock data from a JSON File during development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages