Skip to content
File based Node REST API mock server
JavaScript HTML Other
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo [change] use create-react-app's openBrowser instead of open Mar 8, 2018
lib fix(Windows): Drop Leading '\' on Windows from endpoint Apr 25, 2019
src [add] #42 static content as response Jun 23, 2017
test [fix] Use file path basename instead of file path to determine HTTP s… Jun 20, 2018
views Merge branch 'develop' into feature/tunnel Aug 18, 2017
.editorconfig [setup] add editorconfig file Sep 19, 2017
.eslintignore [refactoring] add global eslint config Apr 6, 2017
.eslintrc.js [refactoring] add global eslint config Apr 6, 2017
.gitignore [setup] use exact verions, update mocha and inquirer Jan 21, 2018
.travis.yml [setup] drop node 4 support Mar 8, 2018
LICENSE [doc] add license and changelog files Jun 28, 2016
appveyor.yml [setup] drop node 4 support Mar 8, 2018
init.js [add] add initialisation process for super fast setup Jul 29, 2017
mock-server.js [add] collection cli support May 14, 2017
package-lock.json [fix] clean package-lock and fix typo Mar 25, 2019
package.json [chore] bump up version Apr 26, 2019 [chore] bump up version Apr 26, 2019


File based Node REST API mock server

Build status Build status npm npm Codestyle


Getting Started

This application requires Node 6 or higher. For Node <6 please use node-mock-server@0.22.1 For Node <4 please use node-mock-server@0.11.0

1. Install npm package:
$ npm install node-mock-server --save-dev
2. Start init process:
$ node node_modules/node-mock-server/init


node-mock-server options

Usage examples

node-mock-server usage examples



$ node <nodeScript> --help

    $ node <nodeScript> [--version] [--help] <command> [<args>]

    $                  start mock server
    $ --version        print node-mock-server version
    $ --help           print help
    $ swagger-import   run a swagger import
    $ validate         run a validation for all mock data
    $ collections      print all available collections
    $ collection <id>  activate collection

    $ node demo/index.js --version
    $ node demo/index.js collections


git clone
cd node-mock-server
npm install
node demo


MIT License


Please see the Releases

You can’t perform that action at this time.