Skip to content

Go server offering APIs to manage and retrieve educational resources.

License

Notifications You must be signed in to change notification settings

vishalvivekm/pyqqserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyqqserver

A Go-based server that provides an API for managing and retrieving educational resources. It uses MongoDB as the database and Gorilla Mux for routing.

Getting Started

Prerequisites

  • Go 1.23.1 or later
  • MongoDB
  • A .env file with the following environment variables:
    • MONGO_URI: The connection string for your MongoDB instance.

Installation

  1. Clone the repository:

    git clone https://github.com/vishalvivekm/pyqqserver.git
    cd pyqqserver
  2. Install the dependencies:

    go mod download
  3. Create a .env file in the root directory of the project and add your MongoDB URI:

    MONGO_URI=your_mongo_db_uri

Running the Application

To run the application, from the root of the project, use the following command:

go run main.go

The server will start and listen on the Port specified in the .env file or default to port 8080.

API Endpoints

The application provides the following API endpoints:

Get Resources

  • URL: /drive/{type}/{subject}
  • Method: GET
  • Description: Retrieves resources based on type and subject.
  • Example: /drive/notes/math

Get Subjects

  • URL: /{course}/{semester}/{branch}
  • Method: GET
  • Description: Retrieves subjects for a specific course, semester, and branch.
  • Example: /btech/secondsemesters/GEC

Get Subject Details

  • URL: /{course}/{semester}/{branch}/{subject}
  • Method: GET
  • Description: Retrieves details for a specific subject.
  • Example: /btech/firstsemesters/GCS/math

Project Structure

  • app/: Contains the main application code.
  • handler/: Contains the HTTP handler functions.
  • db/: Contains the database initialization code.
  • main.go: The entry point for the application.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Feel free to contribute to this project by submitting issues or pull requests.

About

Go server offering APIs to manage and retrieve educational resources.

Topics

Resources

License

Stars

Watchers

Forks

Languages