GoScrobble/README.md

42 lines
1.3 KiB
Markdown
Raw Normal View History

2021-03-23 06:07:39 +00:00
# go-scrobble
Golang based music scrobbler.
2021-03-23 08:43:44 +00:00
Stack: Go 1.16+, Node 15+, React 17+, MySQL 8.0+, Redis
2021-03-24 04:19:18 +00:00
There are prebuilt binaries/packages available.
2021-03-23 08:43:44 +00:00
Copy .env.example to .env and set variables. You can use https://www.grc.com/passwords.htm to generate a JWT_SECRET.
2021-03-23 08:43:44 +00:00
2021-03-27 21:57:23 +00:00
## More documentation
2021-03-28 08:52:34 +00:00
[Changelog](docs/changelog.md)
2021-03-27 21:57:23 +00:00
[Environment Variables](docs/config.md)
2021-03-24 09:28:05 +00:00
## Setup MySQL
2021-03-23 08:43:44 +00:00
create user 'goscrobble'@'%' identified by 'supersecurepass';
create database goscrobble;
grant all privileges on goscrobble.* to 'goscrobble'@'%';
2021-03-27 21:57:23 +00:00
## Local Development
2021-03-25 05:15:01 +00:00
cp .env.example .env # Fill in the blanks
2021-03-23 08:43:44 +00:00
go mod tidy
2021-03-25 05:15:01 +00:00
CGO_ENABLED=0 go run cmd/go-scrobble/*.go
# In another terminal cp web/.env.example web/.env.development and set vars
2021-03-27 21:57:23 +00:00
cd web && npm install && npm start --env development
2021-03-23 08:43:44 +00:00
2021-03-27 21:57:23 +00:00
Access dev frontend @ http://127.0.0.1:3000 + API @ http://127.0.0.1:42069/api/v1
2021-03-24 03:29:35 +00:00
## Prod deployment
We need to build NPM package, and then ship web/build with the binary.
2021-03-27 21:57:23 +00:00
2021-03-25 05:15:01 +00:00
cp .env.example .env # Fill in the blanks
cp web/.env.example web/.env.production
2021-03-27 21:57:23 +00:00
cd web npm install --production && npm run build --env production
2021-03-24 03:29:35 +00:00
go build -o goscrobble cmd/go-scrobble/*.go
./goscrobble
## Support Development!
Feel free to support hosting and my coffee addiction https://liberapay.com/idanoo