GithubHelp home page GithubHelp logo

smarthomebackendpublic's Introduction

README FILE FOR THE BACKEND SERVER - NODEJS AND KOA - TEAM HORSE

ws://localhost:8000/

Host: localhost

Port: 8000

Current routes:

  • /requestlight

  • /requesttemp

  • /requestalarm

How to run:

clone the repository:

  1. git clone https://github.coventry.ac.uk/302CEM-1920JANMAY/TeamHorse-302CEM-back-end.git

  2. Change directory(cd) into the directory with the index.js file

  3. npm install (if any modules are missing, use(remove quotes) "npm install missing_module_name" to install missing modules).

    • Make sure XAMPP or LAMPP is running on your local machine with MySQL running on port 3306 and default username and password.
  4. node index.js to start the server.

  5. Server will currently listen for and work with:

    • Target temperature, current temperature, day/night setting and room.
    • Light on or off information.
    • All data stored in mysql is pushed to the front end every 10 seconds.
    • Alarm data as per the backend data structure file in teams

To Note:

"logs" sent to the temp route will return all of the logs. "close" message on both the lights and temperature routes will close the websocket connections until the page is reloaded.

smarthomebackendpublic's People

Contributors

garethholloway avatar timbabs1 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.