A brief description of what the microservice does.
In order to keep labels consitent across micro services, we will use the template available in the docs folder of this repo to auto populate the new repo with labels. After running "npm install", run the following commands from the server directory:
npx ghlbl -o NACAGA -r <name-of-new-repo> -t <organization-pat> -d npx ghlbl -o NACAGA -r <name-of-new-repo> -t <organization-pat> -i docs/labels.jsonProvide a high-level overview of the microservice, including its purpose, key features, and any important concepts.
-
URL:
/endpoint1 -
Method:
GET -
Description: Description of what this endpoint does.
-
Query Parameters:
Parameter Type Description param1String Description of param1 param2Number Description of param2 -
Example:
Request
{ "headers": {}, "body": { "body-element-1": "element-1" } }{ "result": { "response-element-1": "example response" } }
These are the steps to follow to get the database running in a local docker container.
The microservice uses a relational database system, specifically MySQL.
The following tables constitute the database schema:
Stores information about users.
| Column | Type | Description |
|---|---|---|
id |
INT | Unique user identifier |
username |
VARCHAR | User's username |
email |
VARCHAR | User's email address |
created_at |
DATETIME | Date and time of user creation |
- The
Poststable has a foreign key (user_id) referencing theUserstable'sid.
Before you begin, ensure you have the following prerequisites installed:
-
Clone the repository:
git clone https://github.com/NACAGA/<new-microservice>.git
-
Change into the project directory:
cd <new-microservice>
-
Install dependencies:
npm install
Make sure to include a .env file in the root directory of the project (Same directory as this README). The following environment variables
should be present:
HOST=localhostAdjust the values based on your specific configuration.
To run the service locally on your machine, run the following command inside of the server directory.
npm startTo run the service in Docker containers the following command from the base directory:
docker compose up --build --force-recreateTo remove all containers afterwards, run:
docker compose downTo spin up the microservice in a local docker container, follow these steps:
- Run this command in the server directory
docker ...
Provide instructions on how to perform tests from the test suite here.