Git Product home page Git Product logo

mr-test's Introduction

README

(Very) basic Server and Client for notifying. The server is implemented using node and has a single "/vault" endpoint. Sending a POST request to "/vault" generates a notification to the current supervisor "on shift", and places it on a queue. Sending a GET request to "/vault" removes notifications from the queue and returns them as the JSON response.

The client.html has 2 basic client functions - the first is a button to simulate getting access to the vault which sends a POST request to the server. The second is on a 10 second interval, a GET request is sent to the server to get the current notifications and display them (in JSON format).

How to test

  1. Install dependencies
    npm install
  2. Run server.js in a node process
    node server.js
  3. Run client.html in a browser
  4. Use the "Access Vault" button to send the request to the server to generate the notification. Watch for responses from the GET requests displaying notifications currently on the queue (notifications are removed from the queue as they are read during building the GET response).

mr-test's People

Contributors

merrington avatar

Watchers

James Cloos 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.