Backend Server
Go to file
Nicolai Ort 324d5709e3 Added tmp files to gitignore
ref #67
2021-01-07 19:19:21 +01:00
.vscode 🐞 VSCode formatting broke code by removing all unused 2020-12-04 17:05:13 +01:00
scripts Switched to automatic license attribution generation via oss-attribution-generator 2020-12-31 15:14:51 +01:00
src Added scan get tests 2021-01-07 19:18:26 +01:00
.dockerignore Added sqlite testing db to ignores 2020-11-25 18:32:01 +01:00
.drone.yml Switched to automatic license attribution generation via oss-attribution-generator 2020-12-31 15:14:51 +01:00
.env.ci Added the POSTALCODE_COUNTRYCODE to the sample and ci env files 2020-12-22 12:40:11 +01:00
.env.example Added the POSTALCODE_COUNTRYCODE to the sample and ci env files 2020-12-22 12:40:11 +01:00
.gitignore Added tmp files to gitignore 2021-01-07 19:19:21 +01: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 Fixed switch up between node/js and ts-node/ts 2021-01-03 18:27:58 +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)