Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

mhazy/mock-backend

Repository files navigation

mock-backend

Build Status

Node-based API with in-memory storage built with hapi.

API documentation is generated from route configuration using lout and can seen at at /docs.

Screen Shot

Installation & Usage

npm install
npm start

ngrok is an easy way to make your local server publicly accessible if required.

Data Persistence

When the server stops, your data is dead. So it goes.

Options

The following environment variables are used for configuring the server.

  • API_HOST - The hostname/ip to bind the server to (default: 0.0.0.0)
  • APP_PORT - The port to listen to requests on (default: 3000)

CORS (Cross-origin resource sharing)

By default, all routes are accessible from any origin. You may change that to a whitelist of origins in server/config/index.js - hapi.options.routes.cors.

About

Basic API implementation with in-memory storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published