cd $GOPATH/src/github.com/austindoeswork/
git clone https://github.com/austindoeswork/music_b.git
go packages
go get
youtube-dl
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
get ssl cert/key for https (only if running https locally)
- run these commands
openssl genrsa -out server.key 2048
openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
- should create
server.crt
andserver.key
create a config
- from root dir (
github.com/austindoeswork/music_b/
)- touch
config.json
- touch
- example
config.json
{
"ServerAddress": ":8100",
"Secure": false,
"SSLCert": "server.crt",
"SSLKey": "server.key"
}
run the server
go run main.go
orgo build .;./music_b
remote_address: austindoes.work
- ensure server is not running
./bin/deploy
ssh austindoes.work
$user@austindoeswork> sudo ~/music_b