Skip to content

A dev mock server for nodejs project, focus on improving development efficiency

Notifications You must be signed in to change notification settings

Peter-WF/nodejs-mock-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodejs-mock-server

A dev mock server for nodejs project, focus on improving development efficiency

Getting Started

1. Install npm package:

$ npm install nodejs-mock-server --save-dev

2. Init mock-server:

// Boot 
const express = require('express')

require('nodejs-mock-server')

const app = express()

// init mock-server
MS.init({
  app,
  appDir: __dirname
})

// add intercept
app.use('/api/*', MS.intercept())

demo: nodejs-simple-demo

3. Visit /mock-server/#/

Usage Example

Guide && Schematic Diagram

TODO List

  • dev server

  • request/response intercept

  • guide && schematic diagram

  • add mock feature with mockjs

About

A dev mock server for nodejs project, focus on improving development efficiency

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published