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.
- Go 1.23.1 or later
- MongoDB
- A
.env
file with the following environment variables:MONGO_URI
: The connection string for your MongoDB instance.
-
Clone the repository:
git clone https://github.com/vishalvivekm/pyqqserver.git cd pyqqserver
-
Install the dependencies:
go mod download
-
Create a
.env
file in the root directory of the project and add your MongoDB URI:MONGO_URI=your_mongo_db_uri
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.
The application provides the following API endpoints:
- URL:
/drive/{type}/{subject}
- Method:
GET
- Description: Retrieves resources based on type and subject.
- Example:
/drive/notes/math
- URL:
/{course}/{semester}/{branch}
- Method:
GET
- Description: Retrieves subjects for a specific course, semester, and branch.
- Example:
/btech/secondsemesters/GEC
- URL:
/{course}/{semester}/{branch}/{subject}
- Method:
GET
- Description: Retrieves details for a specific subject.
- Example:
/btech/firstsemesters/GCS/math
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.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to contribute to this project by submitting issues or pull requests.