GithubHelp home page GithubHelp logo

lifes-a-riot-with-spies's Introduction

Lifes a Riot with Spies

Logging

Adding a logger with morgan, experiment with the different formats...

Try and create a log format where you can track who is calling your spy from where

If you are brave, add a rotating file system using, well rotating-file-system

If you are really, really brave use Winston to set log levels!

Controlling Response Time

Create a new route that responds using static json with a status code of 200

Create a new route that responds using json with faker to generate dynamic data

Add a config file with key value pairs of routes and response times

Add a config route which has the POST method available, with the ability to change response times programatically

For the really brave, use pug to create an interface for managing that config!

Spy Counter

Use nedb to create a new data structure

Report from each request to that route to the database with an updated number of total requests

Routes available in this repo:

Table of Contents

Install

npm version required - 3.10.X and above
node version required - v6.9.X and above
Clone this mutha down, cd in

Usage

npm start - will start the application on port 3000 - navigate to http://localhost:3000
env PORT={port_number} npm start will start on http://localhost:{port_number}

npm run dev - will start the application using nodemon

Docker

To build in the root dir, run the following:

docker build --rm -f Dockerfile .

To run:

docker run --rm -d -p 5000:3000 lifes-a-riot-with-spies

*Where 5000 is the host port and 3000 is the exposed port in the container

Contribute

PRs accepted.

License

MIT © Ash Winter and Chris Chant

lifes-a-riot-with-spies's People

Contributors

northern-tester avatar chrischant3 avatar

Stargazers

Sumanth avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.