Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Server for static Stub API

Simple static stub API Node.js based

The most simplest server stub API
Serve static json files according to URL
  • End points URL can start with /api/v1/
  • Add folders with .json extension to serve the json as response
  • The response will analyze the path and will return the file is specified of default.json from the designated folder.

Start the server

$ node node server-stub-api.js

Server is running on

http://localhost:8001

Add response files in the directories

http://localhost:8001/api/v1/{dir1?}/{dir2?}/{filename?}

  • file name can be specified in the url with or without .json extension.
  • if file name is not specified, than the server will return the file default.json

Examples


Server will return the file - ./example-api/default.json


Server will return the file - ./example-api/plylist.json


About

Simple Nodejs Server for static Stub API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages