-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Zastinian edited this page Jul 15, 2023
·
2 revisions
-
Discord Bot You need
Administrator
permission to enter the dashboard - Discord
- Website
Creates an instance of the Express application.
- {Object} - The Express application object.
Retrieves a list of questions from a website based on the specified tag and page number.
- {string} tag - The tag to filter the questions by.
- {number} page_number - The page number of the questions to retrieve.
- {Promise<Array<{id: string}>>} - A promise that resolves to an array of question objects, each containing an ID.
Retrieves a question and its corresponding answer from a website based on the provided question ID.
- {number} questionId - The ID of the question to retrieve.
- {Promise<{question: {title: string, body: string}, answer: {body: string}}>} - A promise that resolves to an object containing the question and answer.
Handles GET requests to the root endpoint ("/").
- {Object} req - The request object.
- {Object} res - The response object.
Handles a GET request to the "/api" endpoint. Retrieves questions based on the provided query parameters and returns a JSON response.
- {Object} req - The request object.
- {Object} res - The response object.
Starts the application server and listens for incoming requests on the specified port.
- {number} port - The port number to listen on.