Skip to content
This repository has been archived by the owner on Mar 20, 2022. It is now read-only.

API for the Secure Booking Service

Notifications You must be signed in to change notification settings

Secure-Booking-Service/backend

Repository files navigation

HDD-Rack Icon by Bootstrap

Secure Booking Service - Backend


Badge SAST Azure - CD

📁 Folder /src

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.

🧑‍💻 Development Setup

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.

⚗️ Prerequisites

We have also set up a .devcontainer. Learn more

🔧 Setup .env

Create a /.env file based on ./.env.example

  • JWT_SECRET choose a random string
  • RP_ID choose localhost
  • RP_ORIGIN enter the URL where you open the frontend like http://localhost:8080
  • MONGO_ENCRYPTION_KEY use openssl rand -base64 32 to generate a value
  • MONGO_SIGNING_KEY use openssl rand -base64 64 to generate a value
  • AMADEUS_API_KEY API-key from Amadeus Developer Portal
  • AMADEUS_API_SECRET API-Secret from Amadeus Developer Portal

📁 Installing modules

Run npm ci to install all required node modules.

🛫 Start development

Run npm start at the root of the directory.


Icon by Bootstrap published under MIT licence.