Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 2.27 KB

README.md

File metadata and controls

79 lines (53 loc) · 2.27 KB

LCR Backend

This repository contains the backend code for the LCR_Server project.

Description

lcr_server is a backend project aimed at providing a RESTful API for interacting with the LCR (Left, Center, Right) game. The project is built using Golang, Firebase SDK, Postgres, and other frameworks/libraries, ensuring a fast and efficient backend service that can handle concurrent requests.

Project Structure

The backend project consists of the following main directories and files:

  • controllers: This directory contains the controllers for the server.
  • db: This directory contains the database related files.
  • docs: This directory contains the compiled swagger documentation for the backend code.
  • lcr: This directory contains the core logic of the LCR game.
  • model: This directory contains the data models.
  • responses: This directory contains response formatting.
  • routes: This directory contains route definitions.
  • static: This directory contains static files that the server might need to serve.
  • util: This directory contains utility functions and structures.
  • backend: This is the executeable produced from compiling the project.
  • go.mod & go.sum: These files are used by Go's dependency management system.
  • main.go: This is the main entry point for the GoFiber server.

Local Development

To run this project locally, follow the steps below:

  1. Make sure you have Go installed on your machine.

  2. Clone the repository:

git clone https://github.com/ojimba01/lcr_server.git
  1. Navigate into the project directory:

(Make sure you have a .env file configured for PostgreSQL in the lcr_server/backend directory)

cd lcr_server/cmd
  1. Build and run the project:
./local-start.sh

Local Development with Docker

  1. Make sure you have Go installed on your machine.

  2. Clone the repository:

git clone https://github.com/ojimba01/lcr_server.git
  1. Navigate into the project directory:
cd lcr_server/cmd
  1. Build and run Docker container:
./docker-start.sh
  1. Enter password for the password for a remote PostgreSQL DB:

(this is neccessary to gain access to the firebase RTDB)

Enter your POSTGRES_PASSWORD:[PASSWORD]