@clraconis/re-mock
v0.0.1
Published
``` <project root> |- src |- mock.config.js |- mocks |- mock1.js |- mock2.js |- mock3.js ```
Downloads
2
Readme
Use case:
<project root>
|- src
|- mock.config.js
|- mocks
|- mock1.js
|- mock2.js
|- mock3.js
const mockServer = require("pro-mock");
const endPoints = mockServer.getEndPoint();
module.exports = {
env: {
...endPoints,
},
// ... other configs
};
Custom Next Laucher
const nextConfig = require("./next.config.js");
const MockServer = require("pro-mock");
const nextLauncher = require("pro-mock/next-launcher");
nextLauncher(new MockServer(), nextConfig);