Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.46 KB

File metadata and controls

34 lines (22 loc) · 1.46 KB

API Gateway

The API Gateway acts as a gateway to all other services and simultaniously offers a REST API for operations like uploading files, initializing SSE streams for clients and downloading files.

Using docker

tbd

Running locally

Dependencies

One of the dependencies is audiowaveform, which handles calculating a downsampled representation of an uploaded audio file. For installation refer to their installation guide or if using ubuntu do:

sudo add-apt-repository ppa:chris-needham/ppa
sudo apt-get update
sudo apt-get install audiowaveform

For further audio processing FFmpeg is used, make sure to install the dependencies outlined in the docs

First start

  1. yarn install
  2. add .env file and copy over the template from .env.template
  3. add relavant secrets to .env file. DON'T COMMIT THIS
  4. npx prisma db push to create the audio_db table from current prisma schema
  5. npx prisma generate to generate the prisma client
  6. yarn dev

Generally its good practise to use npx prisma db pull and npx prisma generate when you suspect the schema of the db has changed in a previous commit.

With npx prisma studio you can easily start a small application that provides a UI for looking at your postgresql db.