1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Readme: instructions for local build & debugging

This commit is contained in:
Johannes Hoppe
2022-06-24 00:26:47 +02:00
parent 5d8b3ee3fd
commit 68891e0e52
3 changed files with 32 additions and 2 deletions

3
.gitignore vendored
View File

@ -31,3 +31,6 @@ venv/
.DS_Store
/podsync
db
config.toml

15
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
// from https://github.com/vscode-debug-specs/go#debugging-executable-file
"name": "Debug Podsync",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/podsync",
"cwd": "${workspaceFolder}",
"args": ["--config", "config.toml"]
}
]
}

View File

@ -100,11 +100,23 @@ Server will be accessible from `http://localhost:8080`, but episode links will p
## How to run
### Run as binary:
### Build and run as binary:
Make sure you have created the file `config.toml`. Also note the location of the `data_dir`. Depending on the operating system, you may have to choose a different location since `/app/data` might be not writable.
```
$ ./podsync --config config.toml
$ git clone https://github.com/mxpv/podsync
$ cd podsync
$ make
$ ./bin/podsync --config config.toml
```
### How to debug
Use the editor [Visual Studio Code](https://code.visualstudio.com/) and install the official [Go](https://marketplace.visualstudio.com/items?itemName=golang.go) extension. Afterwards you can execute "Run & Debug" ▶︎ "Debug Podsync" to debug the application. The required configuration is already prepared (see `.vscode/launch.json`).
### Run via Docker:
```
$ docker pull mxpv/podsync:latest