GithubHelp home page GithubHelp logo

garbagevehicletracker-org / backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from garbagevehicletracker/backend

0.0 0.0 0.0 5.46 MB

backend code of garbagevehicletracker

JavaScript 100.00%

backend's Introduction

backend

backend code of garbagevehicletracker

Route to handle incoming coordinates and user details

router.post("/send-coordinates", PositionController.createUser);

Route to respond to GET request with current coordinates

router.get( "/get-coordinates/:userId/:date?", validateDateParameter, PositionController.getCoordinates );

Route to handle sending vehicle data to MongoDB

router.post("/send-driver", DriverController.createDriver);

Route to fetch individual or all drivers

router.get("/get-driver/:driverId?", DriverController.getDriver);

Route to handle sending vehicle data to MongoDB

router.post("/send-vehicle", VehicleController.createVehicle);

Route to fetch individual or all vehicles

router.get("/get-vehicle/:id?", VehicleController.getVehicle);

Route to create a new area

router.post("/create-area", AreaController.createArea);

Route to add a new garbage point to a specific dustbin within an area

router.post("/add-dustbin-point", AreaController.addDustbin);

router.get("/get-area/:areaName?", AreaController.getAreaByName);

Route to fetch a list of all areas

router.get("/get-all-areas", AreaController.getAllAreas);

router.get("/get-all-dustbins/:areaId?", AreaController.getAllDustbins);

router.get("/get-dustbin-count/:areaId?", AreaController.getDustbinCount);

router.get("/get-all-assigned-work", AssignedWorkController.getAllAssignedWork);

Update the current position

router.post("/update/:userId?", CurrentPositionController.updatePosition);

Fetch the current position

router.get("/get/:userId?", CurrentPositionController.getPosition);

router.post("/assign-work", AssignedWorkController.assignWork);

Authentication-protected route example

router.post("/protected-route", authenticateUser, (req, res) => { res.success("This route is protected"); });

router.post("/login", AuthController.login);

backend's People

Contributors

dhabaldeep avatar rahulgorai0206 avatar garbagevehicletracker 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.