Giter Club home page Giter Club logo

indego's Introduction

Indego API

  • Built with Node.js version 15.11.0
  • Built upon the Express framework
  • Uses Mongodb for data persistence and Mongoose as the ODM
  • Uses The Indego GeoJSON station status API
  • Uses the Open Weather Map API
  • Uses a static JWT token for authentication
  • Deployed to heroku

APIs

  1. The API is deployed on heroku.

  2. There are three main endpoints which can be viewed on swagger here.

    • Note - for endpoint /snapshot, swagger UI hangs if there is too much data
  3. Each endpoint is protected by a Bearer auth token which acts as an authentication layer

    • Set request header (or in the Authorize tab in swagger, add just the token):
      • Authorization: Beaer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXNzYWdlIjoiZHVtbXkgc3RhdGljIHRva2VuIiwiaWF0IjoxNjIwNTQ1NjY0LCJleHAiOjE2MjMxMzc2NjR9.nxbpAbZ4kb5exQrK_ZhRl_qZlu600GJkDlZJvXftF14
    • Note - This token is valid for 30 days

Cron job

To enable the job to fetch data from the indego API after every hour, set the ENABLE_CRON_JOB to true in the environment variables.

Starting the API locally

Note: Replace yarn with npm if you are not a yarn user.

  • Make sure to create a .env file at the root of the project and place the required environment variables (a .env.example file is provided for reference)
  • At the root of the project directory, run:
    • yarn install
    • yarn start:dev

Testing

  • At the root of the project, run
    • yarn test

Front end UI

Go here and follow the instructions to start up the app in the browser.

indego's People

Contributors

usmanzaheer1995 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.