UNPKG

@akshay89/mock-server-ngapimocks

Version:

Mock server implementation using ngApiMocks

47 lines (28 loc) 970 B
# ng-apimock ### Node plugin that provides the ability to use scenario based api mocking: - for local development - for protractor testing ### Install ``` npm install @akshay89/mock-server-ngapimocks ``` ### Usage Add npm script in package.json ``` node node_modules/@akshay89/mock-server-ngapimocks/mock-server.js --mocks=mock-folder-name/ ``` ### Mock Server GUI To manage mock server visit - http://localhost:3000/dev-interface and you can update scenarios. ### Mocks Example mocks is provided for reference in `/mocks/` folder. Provide your mocks in below format: `FILENAME.mock.json` e.g. `get-users.mock.json` ### Endpoints There are a few endpoints available when you startup @ng-apimock/core: - `/ngapimock/info` - responsible for providing information of the running instance - `/ngapimock/health` - responsible for providing status information - `/ngapimock/health/readiness` - readiness probe - `/ngapimock/health/liveness` - liveness probe