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

@ng-apimock/docker

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ng-apimock/docker

Standalone setup for @ng-apimock/core

  • 3.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Docker image for @ng-apimock

Usage

You can start the docker container manually

$ docker run --name my-mock-server -d ngapimock/standalone:latest -p 3000:3000 -v ./mocks:/opt/ngapimock/mocks -v ./extension.js:/opt/ngapimock/extension.js

or using docker-compose.yaml

version: '3.3'

services:
  ngapimock-standalone:
    image: ngapimock/standalone:latest
    restart: always
    ports:
      - '3000:3000'
    expose:
      - '3000'
    volumes:
      - ./mocks:/opt/ngapimock/mocks
      - ./extension.js:/opt/ngapimock/extension.js

Port

3000

Mocks

The mocks are read from your volume mount to /opt/ngapimock/mocks

extension.js

The extension.js file is read from your volume mount to /opt/ngapimock/extension.js

This is an optional feature that can be used for instance for proxing your requests.

module.exports = {
    extend: extend
}
function extend(app) {
    console.log("extending the server");

    const { createProxyMiddleware } = require('http-proxy-middleware');

    app.use('/some/path', createProxyMiddleware({ target: 'https://some.api',changeOrigin: true,timeout: 5000}));
}

Documentation on ng-apimock

Documentation about ng-apimock can be found at https://github.com/ng-apimock/core

Dev-interface

The dev-interface can be accessed under:

http://localhost:3000/dev-interface

Keywords

FAQs

Package last updated on 11 Jun 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