front-end-mock

1.0.8 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i front-end-mock

Weekly Downloads

1

Version

1.0.8

License

MIT

Unpacked Size

25.5 kB

Total Files

9

Last publish

Collaborators

  • smallchild