1.0.8 • Published 8 years ago

front-end-mock v1.0.8

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

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
1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago