local-mock-server

a local mock server for development

Usage no npm install needed!

<script type="module">
  import localMockServer from 'https://cdn.skypack.dev/local-mock-server';
</script>

README

local-mock-server

A simple local mock server with cli tool

About

You can use it with Node.js API or CLI tool.

Install

$ npm i --save-dev local-mock-server

Example

CLI

serve mock files in 'mockdir' directory

mock -d mockdir

Node.js API

const mock = require('local-mock-serever')
mock('mockdir') // '/mock' directory by default