https://github.com/interviewandhealth/microservices-backend-express-base
Base for the Express Microservice Architecture Backend for the Mock Interview and Mental Health Platform
https://github.com/interviewandhealth/microservices-backend-express-base
base express microservice template
Last synced: about 2 months ago
JSON representation
Base for the Express Microservice Architecture Backend for the Mock Interview and Mental Health Platform
- Host: GitHub
- URL: https://github.com/interviewandhealth/microservices-backend-express-base
- Owner: InterviewAndHealth
- Created: 2024-09-23T10:56:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-11T18:51:49.000Z (over 1 year ago)
- Last Synced: 2025-01-25T14:44:07.612Z (over 1 year ago)
- Topics: base, express, microservice, template
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microservices Express Backend Base
### This repository will be used as the base for the microservice architecture backend for the mock interview project.
## Architecture
- `database`: Responsible for handling the database operations.
- `repository`: Responsible for handling the database operations for a specific entity.
- `services`: Responsible for handling the business logic.
- `routes`: Responsible for handling the API routes.
- `middlewares`: Responsible for handling the middlewares.
- `utils`: Responsible for handling the utility functions.
- `config`: Responsible for handling the configuration.
### Broker
In the `services` directory, there is a `broker` directory that is responsible for handling the communication between the services. The broker is divided into two parts:
- `events`: Responsible for handling the events between the services.
- `rpc`: Responsible for handling the Remote Procedure Calls (RPC) between the services.
## Setup
1. Clone the repository.
2. Install the dependencies.
```bash
npm install
```
3. Start the docker containers.
```bash
docker-compose up -d
```
4. Setup the environment variables in the `.env` file.
5. Start the application.
```bash
npm run dev
```