Website Deployed here ....
The Events API is to display events conducted by HTB SRMIST.
GET /api/v1/events
{
"success": bool,
"message": string,
"data": Array[Objects]
}Events returns the following status codes in its API:
| success | Status Code | Description |
|---|---|---|
| true | 200 | ✅ Successfully fetched! |
| false | 405 | 🚫 HTTP Method not Allowed |
| false | 500 | ❌ Database connected but failed to fetch the data! |
The Teams API is to display Team memebers of all our domain in HTB SRMIST.
GET /api/v1/teams?current=true
| Query | Type | Description |
|---|---|---|
current |
boolean |
True Members currently in team False Past members |
{
"success": bool,
"message": string,
"data": Array[Objects]
}Teams returns the following status codes in its API:
| success | Status Code | Description |
|---|---|---|
| true | 200 | ✅ Successfully fetched! |
| false | 405 | 🚫 HTTP Method not Allowed |
| false | 422 | 👉 ValidationError |
| false | 500 | 🔌 Internal Server Error. |
The Healthcheck API is to display the health of server which host our official website.
GET /api/v1/healthcheck
{
"success": boolean'
"message": string'
"timestamp": string'
"uptime": number'
}HealthCheck returns the following status codes in its API:
| success | Status Code | Description |
|---|---|---|
| true | 200 | API v1 working! |
| false | 405 | 🚫 HTTP Method not Allowed |
The ContactUs API is to display .
POST /api/v1/contactus
| Body | Type | Description |
|---|---|---|
name |
string |
Required. Your Name |
email |
string |
Required. Your Email |
ContactNo |
string |
Your Contact No. |
question |
string |
Required. Your Name |
countryCode |
string |
Your Name |
{
"success": bool,
"message": string,
}ContactUs returns the following status codes in its API:
| success | Status Code | Description |
|---|---|---|
| true | 200 | ✅ Successfully sent the message! |
| false | 405 | 🚫 HTTP Method not Allowed |
| false | 422 | question must be at least 30 characters. |
| false | 500 | 🔌 Internal Server Error. |
Setup the dev environment to contribute
- Install Node and NPM.
- Install MongoDB-Server Locally.
- Run
npm installafter you clone the repo.
First, run the development server:
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.
The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.