(Right now there is no auto deploy installed)
- Copy everything from the
mainbranch intogencomp.medienhaus.udk-berlin.de/home/vinzenz/zukunftsmusik.radio/public - SSH into the server and run
npm install --productionand thennpm run prod - The node server is rebuilt and restarted to serve the frontend.
- Check api paths in
nuxt.config.jsarehttps://zukunftsmusik.radio:8093/ - Run
yarn generate - Copy the contents of the
buildfolder togencomp.medienhaus.udk-berlin.de/home/vinzenz/zukunftsmusik.radio/public
- Upload the folder to
gencomp.medienhaus.udk-berlin.de/home/vinzenz/zukunftsmusik.radio/node - SSH into
ssh {user}@gencomp.medienhaus.udk-berlin.de -p 2222 - Go to folder and run
npm install - Get the process id with
sudo pm2 ls - Restart the server with
sudo pm2 restart {processid}
https://zukunftsmusik.radio/manager/ https://zukunftsmusik.radio/fileupload/
Get all audio: GET localhost:8093/audio
Add new audio: POST localhost:8093/audio
Delete audio: DELETE localhost:8093/audio/5fcf5b54d2ee4c490f32bc4d
Testing Apis in Postman
DELETE https://zukunftsmusik.radio:8093/private/audio/test/123123 -> just returns an obj
To secure the api's all private ones run under .../private/.... They're protected with auth from the nginx auth. Same goes for the backend at ./manager.
To use the online apis locally, change the nuxt axios base url to https://zukunftsmusik.radio/. Don't forget to change it back!
To use the secret online apis locally, pass the auth params with the request. Don't forget to change it back and necer commit!