mr54ndm4n / HookWorms-Smart-National-Park-4.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smart National Park 4.0

Build Status

Getting Started

Server Programming

Set-Up

  • Install NodeJS
  • Install MongoDB -> 'mongodb://localhost/hapi'
  • Install dependency
  $ cd ServerProgramming/myapp
  $ npm install
  [14] const CATurl = "http://10.0.0.10";

Get Sensors data and insert to DB

  $ node dataGetter.js

Run Web Server

  $ npm start

Endpoints

  ###################################################################
  # Methods||           URL               ||      Page              #
  ###################################################################
  # [GET ] || /                           || Index                  #
  # [GET ] || /users                      || Participant            #
  # [GET ] || /hapi/                      || hapi_home              #
  # [GET ] || /hapi/teams/all/            || All Teams Data         #
  # [GET ] || /hapi/teams/:teamID         || Team Data              #
  # [GET ] || /hapi/:sensor               || Sensor Data            #
  # [GET ] || /hapi/predicted             || Predicted Data         #
  # [GET ] || /hapi/sendpredicted         || report Predicted Form  #
  # [POST] || /hapi/sendpredicted         || Save Predicted to DB   #
  ###################################################################

Send Predicted Data Form (POST Request)

  {"team_id": "my_team_id", "description": "Forest fire detected!"}

Contributors

About


Languages

Language:MATLAB 38.5%Language:JavaScript 28.1%Language:C 21.7%Language:HTML 11.5%Language:CSS 0.2%Language:Makefile 0.0%