Skip to content

NodeJS server, severing endpoints to trackers. And REST endpoints for client with Web-socket. endpoint

License

Notifications You must be signed in to change notification settings

ProjectGreenZone/project-green-zone-nodejs-server

Repository files navigation

Project Green Zone Server

Requirments

Getting started

  • Run npm install to install dependancies
  • Install nodemon globaly npm install -g nodemon
  • Add your mongodb endpont to config/database.js file
    •    module.exports = {
           database: 'mongodb://localhost:PORT/DATABASE_NAME'
         }
      
  • Run the server using nodemon nodemon server.js or npm start

Technologies used

  • express
  • mongoDB, mongoose
  • socket.io

Routes

  • login : simple authentication stategy : username and password (stored with random salt), passes jwt

  • users :

  • POST users/register : register with username password

  • GET users/trackers/:username : trackers registered for user with :username

  • trackers

  • POST trackers/tack : updated tracker information

  • GET trackers/ : emit tracker details to users channel from /webapp_io end-point

  • webapp_io : socket.io endpoint to get tacker details in realtime. tracker details are emited when new update arrives from tracker or front end client request for details.

About

NodeJS server, severing endpoints to trackers. And REST endpoints for client with Web-socket. endpoint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published