Socket
Socket
Sign inDemoInstall

@ng-apimock/core

Package Overview
Dependencies
85
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ng-apimock/core

ng-apimock core module


Version published
Maintainers
2
Created

Changelog

Source

3.12.0 (2024-04-05)

Features

  • add override ipaddres configuration option (#1070) (72b4fd8)

Readme

Source

@ng-apimock/core

npm Build Status Quality Gate Status Dependabot Status License ts jest Commitizen friendly semantic-release npm downloads

Introduction

ng-apimock is a modular Node.js framework that provides the ability to use scenario based api mocking.

You can use it for:

Installation

yarn add @ng-apimock/core --dev

Minimal setup example (serve.js)

This is a minimal setup example of how you can manually use @ng-apimock/core

const apimock = require('@ng-apimock/core');
const express = require('express');
const app = express();
app.set('port', 9999);

apimock.processor.process({
    src: 'mocks'
});

app.use(apimock.middleware);

app.listen(app.get('port'), () => {
    console.log('@ng-apimock/core running on port', app.get('port'));
});

To start up the script just type:

node serve.js

Minimal setup example (serve.ts)

This is a minimal setup example in TypeScript of how you can manually use @ng-apimock/core

import * as apimock from '@ng-apimock/core';
import express, { Application } from 'express';
const app: Application = express();
app.set('port', 9999);

apimock.processor.process({
    src: 'mocks'
});

app.use(apimock.middleware);

app.listen(app.get('port'), () => {
    console.log('@ng-apimock/core running on port', app.get('port'));
});

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

Contact

We have a few channels for contact:

Extensive documentation

License

@ng-apimock is MIT licensed.

Keywords

FAQs

Last updated on 05 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc