Skip to content

svenbernhardt/canteenBackend

Repository files navigation

Steak Server

This server is an intermediary between the Database and the frontends. It exposes APIs to the clients and is placed in our Intranet. It will be secured through the global OC API Gateway and communicate with it through an API key. The API is defined with Swagger and then auto generated.

Installation

  1. npm install -g typings typescript nodemon
  2. run npm install

Run

To run the server, go to steak-server directory and run:

  1. npm run tsc:watch # to build the typescript files into javascript files
  2. npm run serve # to run the server and rerun it on every change
npm start

Be sure, the Oracle-DB is also started (It's installed as a Windows-Service).

To view the Swagger UI interface:

open http://localhost:8080/docs

Run with Docker

Take a look at the docker-compose.yml and create a docker-compose.override.yml if you want to change something. In the projectfolder then run: docker-compose up

or run in background: docker-compose build then docker-compose start

The API is available at (at this time, not the finally version):

http://10.100.175.7/v1/xxx

'xxx' have to be replaced by the correct path. The API-Key have to be transfered via the HTTP-Header-Field api_key, the username as GET-Parameter.

Notes about Swagger

  • This server was generated by the swagger-codegen project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.
  • This project leverages the mega-awesome swagger-tools middleware which does most all the work.

About

The canteen application backend implementation

Resources

Stars

Watchers

Forks

Packages

No packages published