seek-tune/scripts/start_server.sh
Chigozirim Igweamaka dbd29014e4 Update
2024-06-08 14:20:07 +01:00

24 lines
598 B
Bash

#!/usr/bin/env bash
echo "Hello server" > /home/ubuntu/started.txt
start_server() {
cd /home/ubuntu/song-recognition
export SERVE_HTTPS="true"
export CERT_KEY="/etc/letsencrypt/live/localport.online/privkey.pem"
export CERT_FILE="/etc/letsencrypt/live/localport.online/fullchain.pem"
go build -tags netgo -ldflags '-s -w' -o app
sudo setcap CAP_NET_BIND_SERVICE+ep app
nohup sudo ./app > backend.log 2>&1 &
}
start_client() {
cd /home/ubuntu/song-recognition/client
npm install
npm run build
nohup serve -s build > client.log 2>&1 &
}
start_server