Spaces:
Sleeping
Sleeping
|
Download docs/DEV_GUIDE.md from morgk/soundcloak: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/spaces/morgk/soundcloak/resolve/main/docs/DEV_GUIDE.md
- Command line
-
hf download hf://spaces/morgk/soundcloak/docs/DEV_GUIDE.md
-
curl -L -o DEV_GUIDE.md https://huggingface.co/spaces/morgk/soundcloak/resolve/main/docs/DEV_GUIDE.md
1.99 kB
| # Setup | |
| ## Prerequisites | |
| 1. [golang](https://go.dev) (Soundcloak tries to always target the latest, so choose it) | |
| 2. [git](https://git-scm.com) | |
| ## The setup | |
| 1. Clone this repository: | |
| ```sh | |
| git clone https://git.maid.zone/stuff/soundcloak | |
| ``` | |
| 2. Go into the cloned repository: | |
| ```sh | |
| cd soundcloak | |
| ``` | |
| 3. Download required JS modules: | |
| Currently it's just HLS.js. This is what powers the HLS player | |
| ```sh | |
| go tool soundcloakctl js download | |
| ``` | |
| 4. Build binary: | |
| This uses the `build` script, which generates code from templates, generates code for regular expiressions, and then builds the binary. | |
| ```sh | |
| ./build | |
| ``` | |
| Now, you can run soundcloak with the `./main` binary. By default, it is listening on `127.0.0.1:4664`. For a configuration guide, [refer to here](INSTANCE_GUIDE.md#configuration-guide) | |
| # Updating your local setup | |
| 1. Retrieve the latest code: | |
| ```sh | |
| git fetch origin | |
| git pull | |
| ``` | |
| 2. Update dependencies/tools: | |
| ```sh | |
| go mod download # update tools and dependencies | |
| go tool soundcloakctl js download # re-download JS modules | |
| ``` | |
| 3. Run codegen and build the binary: | |
| ```sh | |
| ./build | |
| ``` | |
| Now, you can run soundcloak with the `./main` binary. | |
| # Contributing | |
| Contributions are appreciated! | |
| We develop soundcloak on [our forgejo instance](https://git.maid.zone/stuff/soundcloak), but feel free to contribute on our [Codeberg](https://codeberg.org/maid-zone/soundcloak) and [Github](https://github.com/maid-zone/soundcloak) as well! | |
| If you want to add a new feature that's not in [the todo list](https://git.maid.zone/stuff/soundcloak/issues/1), please create an issue or discussion first. | |
| If you have updated go dependencies or added new ones, please run `go mod tidy` before commiting. | |
| If you update structs, please run [betteralign](https://github.com/dkorunic/betteralign) to make sure memory layout is optimized. | |
| Any security vulnerabilities should first be disclosed privately to the maintainer ([different ways to contact me are listed here](https://laptopc.at)) |