Skip to content

Backend API for PowerLog fronted trying to follow Clean Architecture principles and DDD

Notifications You must be signed in to change notification settings

Negri234279/PowerLog-backend

Repository files navigation

Build Status

About The Project

Backend API build on node.js with express for PowerLog fronted trying to follow Clean Architecture principles and DDD

Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

Node.js Express Docker

.env file

KEY VALUE
BACKEND_PORT 3000
BACKEND_NAME powerlog-backend
PG_HOST powerlog-pg-db
PG_PORT 5432
PG_USER postgres
PG_PASSWORD postgres
PG_DATABASE postgres
NGINX_PORT 3100
JWT_SECRET_KEY token

Description

  • BACKEND_PORT: port of the node api and used by the nginx proxy
  • BACKEND_NAME: container name of the node api and used by the nginx proxy
  • DB_HOST: name of the database container and used by the api for its connection
  • DB_PORT: database port used by the api for its connection
  • DB_USER: database user and used by the api for its connection
  • DB_PASSWORD: database password and used by the api for its connection
  • DB_NAME: database name and used by the api for its connection
  • NGINX_PORT: nginx proxy port, port used to communicate with the api

How the network works ?

Docker containers communicate using their internal network via container name, so we only expose the nginx proxy port

Getting Started

Prerequisites

Docker and Docker compose

Usage

Build the server:

docker compose -f "docker-compose.dev.yml" up -d --build

Down the server:

docker compose -f "docker-compose.dev.yml" down

Start the server:

docker compose -f "docker-compose.dev.yml" start

Stop the server:

docker compose -f "docker-compose.dev.yml" stop

About

Backend API for PowerLog fronted trying to follow Clean Architecture principles and DDD

Topics

Resources

Stars

Watchers

Forks

Languages