Backend Server
Go to file
Philipp Dormann 5e0fcf1f4a 🐞 VSCode formatting broke code by removing all unused 2020-12-04 17:05:13 +01:00
.vscode 🐞 VSCode formatting broke code by removing all unused 2020-12-04 17:05:13 +01:00
src Emergency fix: Switched to table inheritances 2020-12-03 20:28:07 +01:00
.dockerignore Added sqlite testing db to ignores 2020-11-25 18:32:01 +01:00
.env.example Set env to node_env for the server 2020-11-27 18:46:04 +01:00
.gitignore tsdoc generation 2020-11-27 21:40:42 +01:00
Dockerfile Fixxed dockerfile 2020-12-03 18:48:24 +01:00
LICENSE Initial commit 2020-11-24 16:51:18 +00:00
README.md Added our branch structure to the readme 2020-11-27 21:45:29 +00:00
docker-compose.yml Fixxed dockerfile 2020-12-03 18:48:24 +01:00
ormconfig.ts formatting 2020-11-27 18:28:42 +01:00
package.json tsdoc generation 2020-11-27 21:40:42 +01:00
tsconfig.json ⚙target: es2017 ▶ ES2020 2020-12-03 18:49:21 +01:00

README.md

@lfk/backend

Backend Server

Dev Setup 🛠

Local w/ sqlite

  1. Create a .env file in the project root containing:
     APP_PORT=4010
     DB_TYPE=sqlite
     DB_HOST=bla
     DB_PORT=bla
     DB_USER=bla
     DB_PASSWORD=bla
     DB_NAME=./test.sqlite
    
  2. Install Dependencies
    yarn
    
  3. Start the server
    yarn dev
    

Generate Docs

yarn docs

Docker w/ postgres 🐳

docker-compose up --build

Visual Studio Code

  • will be automatically recommended via ./vscode/extensions.json

Branches

  • main: Protected "release" branch
  • dev: Current dev branch for merging the different features - only push for merges or minor changes!
  • feature/xyz: Feature branches - feature/issueid-title
  • bugfix/xyz: Branches for bugfixes - bugfix/issueid-title (no id for readme changes needed)

File Structure

  • src/models/* - database models (typeorm entities)
  • src/controllers/* - routing-controllers
  • src/loaders/* - loaders for the different init steps of the api server
  • src/routes/* - express routes for everything we don't do via routing-controllers (shouldn't be much)
  • src/middlewares/* - express middlewares (mainly auth r/n)
  • src/errors/* - our custom (http) errors