front-end-mock
v1.0.8
Published
#### Firstly, install the package ```javascript npm install front-end-mock --dev ```
Downloads
12
Readme
Local simulation data are developed during development to improve development efficiency.
Firstly, install the package
npm install front-end-mock --dev
secondly, add frontEndMock.js file in the root directory, syntax:
module.exports = {
"port": 3000,
"routers": [{
"routerName": "/router1",
"data": {
"msg": "Hello"
}
},
{
"routerName": "/router2",
"data": {
"msg": "World"
}
}
]
};
Thirdly, add a "script" entry within your project's package.json file:
"scripts": {
"mock": "mock-server"
},
Last, With the above script entry, you can then start lite-server via:
npm run mock