0.0.7 • Published 9 years ago

json-mock-hapi v0.0.7

Weekly downloads
16
License
MIT
Repository
github
Last release
9 years ago

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 3000
  • start 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 -w
  • list all available arguments:

    node start --help
  • complete sample:

    node start -p 3000 -f './api' -w
        

using the server

  • try this command :

    node start -p 3000 -f './test' -w
  • then, try this url in your navigator :

    http://localhost:3000/hello-world   
  • see "test" folder to find sample service configurations.
0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

1.0.2

9 years ago