json-mock-hapi
v0.0.7
Published
JSON Mock Server. This Server uses the library HAPI.
Readme
README
This Repository contains JSON Mock HAPI Server sources This Server uses the library HAPI.
Requirements
install node js,
clone the project,
type the command:
npm install(this will install other required libraries.)
Compile the projet
type the command:
gulp(Sources are written in ES6 and are "transpiled" with babel)
Unit tests
Unit tests are made with mocha. Tests are located in "test" folder.
Requirements
install mocha:
npm install -g mocha
npm install mocha-traceur --save-dev Run tests:
mocha --compilers js:mocha-traceur Start the server
node start This has the effect to start the mock using port 3000 and the folder "./api" for services configuration.
start the server by specifying the port:
node start -p 3000start the server by specifying the services configuration folder:
node start -f './services-definition'start the server and listen changes in the configuration folder:
node start -wlist all available arguments:
node start --helpcomplete sample:
node start -p 3000 -f './api' -w
using the server
try this command :
node start -p 3000 -f './test' -wthen, try this url in your navigator :
http://localhost:3000/hello-worldsee "test" folder to find sample service configurations.
