diff --git a/.gitignore b/.gitignore index eb418d1..6d89f1a 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ venv/ .DS_Store /podsync + +db +config.toml \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..44de828 --- /dev/null +++ b/.vscode/launch.json @@ -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"] + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 4e41c91..de37153 100644 --- a/README.md +++ b/README.md @@ -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