Skip to content

marco76/node_rest_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

node_rest_server

More here: http://ngjava.com/index.php/2016/10/19/a-simple-node-js-rest-server-simulator-for-testing/

##Goal of the project A simple web server that answer with JSON content to some http requests. This should help during the development phase of REST API. Often we need to open json files to test our code but because the restrictions of the browser we cannot load files on the filesystem.

##How to start

##How it works The server read the url of the request (e.g.: http://localhost:3000/**hello_world**) and open the corresponding file (e.g. hello_world) found in the predefined directory (/json).

#How to add my json files Create a file in the /json directory with the content that you want to see in the answer: [PROJECT_ROOT]/rest/my_example.json

After the restart of the application you can call http://localhost:3000/**my_example**

##Future possible extentions

  • Accept parameters
  • Memory database
  • POST, DELETE etc.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published