Giter VIP home page Giter VIP logo

georgia-drive's Introduction

Check MIA Dates

1

This project is designed to fetch and update driving exam dates and times from the Georgia government API and store them in MongoDB.

It also provides endpoints to retrieve the saved data.

Features

  1. Pulls driving exam dates and times for various categories (theory, manual, and automatic) and cities in Georgia;
  2. Uses randomized User-Agents when sending HTTP requests;
  3. Periodically triggers data update every 10 minutes;
  4. Provides a frontend static file server;
  5. Logs events and errors using the logrus library.

Endpoints

  • /api/update-dates - Fetches data from the API and updates the MongoDB collections.
  • /api/get-theory - Retrieves theory exam dates and times.
  • /api/get-manual - Retrieves manual driving exam dates and times.
  • /api/get-auto - Retrieves automatic driving exam dates and times.
  • /api/last-exec-time - Fetches the last execution timestamp.
  • / - Serves frontend static files.

Prerequisites

  1. Go language environment;
  2. MongoDB instance;
  3. Set the MONGO_URI environment variable to your MongoDB connection string.

How to Run

  1. Clone the repository;
  2. Navigate to the project directory;
  3. Run the command go run main.go.

The application will start, and the logs will indicate that the application is listening on [http://localhost:8080].

Libraries Used

  1. logrus: For logging events and errors;
  2. mongo-driver: For connecting to and performing operations on MongoDB;
  3. Standard Go libraries for HTTP server, JSON manipulation, and other utilities.

Important Note

This project uses a hardcoded API endpoint.

Ensure you have the appropriate permissions or authorization to access the API before triggering the application. Also, avoid excessive requests to prevent potential rate-limiting or blacklisting.

georgia-drive's People

Contributors

arslanbekov avatar dependabot[bot] avatar

Stargazers

 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.