Secure-Booking-Service / backend

API for the Secure Booking Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

API for the Secure Booking Service


Languages

Language:TypeScript 95.2%Language:Dockerfile 3.7%Language:JavaScript 0.9%Language:Shell 0.2%