This section explains the content of the important folder /src
.
/api/*
: This folder contains all endpoint handlers of the api. Its structure mirrors the path of the api endpoints to find the concurrent handler more easily./configuration/*
: Contains various configuration files which are loaded at the beginning to set up express, the logger or to validate the environment variables./routes/*
: This folder contains all routes/endpoints that the backend listens on. These files connect correlating endpoint handlers and their routes. Also these files configure requirements like authentication and authorization./schemas/*
: Contains database schema definitions for various collections like users or bookings.
This section describes the development setup to run the server application locally.
Make sure that you have commit signing active for this repository git config commit.gpgsign true
.
We have also set up a
.devcontainer
. Learn more
- Local MongoDB installation on port 27017 (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/)
- Node with NPM installed (https://nodejs.org/en/download/)
Create a /.env
file based on ./.env.example
JWT_SECRET
choose a random stringRP_ID
chooselocalhost
RP_ORIGIN
enter the URL where you open the frontend likehttp://localhost:8080
MONGO_ENCRYPTION_KEY
useopenssl rand -base64 32
to generate a valueMONGO_SIGNING_KEY
useopenssl rand -base64 64
to generate a valueAMADEUS_API_KEY
API-key from Amadeus Developer PortalAMADEUS_API_SECRET
API-Secret from Amadeus Developer Portal
Run npm ci
to install all required node modules.
Run npm start
at the root of the directory.
Icon by Bootstrap published under MIT licence.