@akshay89/mock-server-ngapimocks

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i @akshay89/mock-server-ngapimocks

Weekly Downloads

1

Version

1.0.2

License

MIT License

Unpacked Size

15.9 kB

Total Files

9

Last publish

Collaborators

  • akshaymhatre89