Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ng-apimock/core

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ng-apimock/core

ng-apimock core module

  • 3.12.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
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

Package last updated on 05 Apr 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc