Backend Server
Go to file
Nicolai Ort f4668b6e81 Added sqlite as to env.sample db of choice [skip ci] 2021-01-21 15:27:11 +01:00
.vscode 🐞 VSCode formatting broke code by removing all unused 2020-12-04 17:05:13 +01:00
scripts Fixed broken pkg stuff 2021-01-15 20:18:14 +01:00
src Merge branch 'dev' into feature/111-runner_selfservic_info 2021-01-20 19:13:18 +00:00
.dockerignore Added sqlite testing db to ignores 2020-11-25 18:32:01 +01:00
.drone.yml automaticly merge main into dev after building a latest image 2021-01-15 21:53:20 +01:00
.env.ci Set country code for the ci env to DE 2021-01-19 15:49:35 +01:00
.env.example Added sqlite as to env.sample db of choice [skip ci] 2021-01-21 15:27:11 +01:00
.gitignore Added tmp files to gitignore 2021-01-07 19:19:21 +01:00
CHANGELOG.md 🧾New changelog file version [CI SKIP] [skip ci] 2021-01-20 19:14:43 +00:00
Dockerfile 🐳 optimize Dockerfile in speed and size (pnpm + layers) 2020-12-12 17:48:32 +01:00
LICENSE Initial commit 2020-11-24 16:51:18 +00:00
README.md Updated folders in the readme 2020-12-05 20:01:06 +01:00
docker-compose.yml 🐳 working Dockerfile 2020-12-12 13:04:37 +01:00
jest.config.js basic jest + typescript support 2020-12-05 18:49:09 +01:00
licenses.md new license file version [CI SKIP] 2020-12-31 17:02:56 +00:00
ormconfig.js basic build works 2020-12-12 12:29:14 +01:00
package.json 🚀Bumped version to v0.2.0 2021-01-19 20:09:30 +01:00
tmp.json Switched to automatic license attribution generation via oss-attribution-generator 2020-12-31 15:14:51 +01:00
tsconfig.json basic build works 2020-12-12 12:29:14 +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/entities* - database models (typeorm entities)
  • src/models/actions* - actions models
  • src/models/responses* - response models
  • src/controllers/* - routing-controllers
  • src/loaders/* - loaders for the different init steps of the api server
  • src/middlewares/* - express middlewares (mainly auth r/n)
  • src/errors/* - our custom (http) errors
  • src/routes/* - express routes for everything we don't do via routing-controllers (depreciated)