Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit e7c5394

Browse files
authored
Merge pull request #69 from voruti/shlink
Add Shlink sample bundle docs
2 parents 5fc4cda + 6d063f9 commit e7c5394

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

docs/samples/shlink.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Using the Shlink sample bundle
2+
3+
The Shlink example bundle in `samples/shlink-list-short-urls` demonstrates the ability to control a [Shlink](https://shlink.io/) server by getting the amount of short urls configured on the server. Here is a guide on how to get it working.
4+
5+
### Prerequisites
6+
7+
- Working NodeCG & nodecg-io installation
8+
- [Shlink server and valid API key / token for it](https://shlink.io/documentation/install-docker-image/)
9+
10+
### Configure the Shlink sample bundle
11+
12+
1. Start nodecg with nodecg-io installed. The shlink-list-short-urls bundle is currently part of it so it should also be loaded.
13+
14+
2. Go to the `nodecg-io` tab in the nodecg dashboard.
15+
16+
3. Login using your password. If this is your first run, then enter the password with which you want to encrypt your configurations and credentials.
17+
18+
4. Create a new Shlink service instance using the left upper menu.
19+
20+
5. Enter the configuration for Shlink.
21+
22+
The created instance should be automatically selected, if not, select it in the upper left menu. Enter the connection information for the Shlink server in monaco (the text-editor on the right) in this format:
23+
24+
```json
25+
{
26+
"url": "https://example.com",
27+
"apiKey": "1ae89449-f8d2-4b44-baf7-dd7eb0b05017"
28+
}
29+
```
30+
31+
After entering it, click save.
32+
33+
_Note:_ If you don't see monaco on the right, try reloading the page.
34+
35+
6. Set the created Shlink service instance to the service dependency of the shlink-list-short-urls bundle.
36+
37+
Select the shlink-list-short-urls bundle and the Shlink service in the left bottom menu and then select the service instance that should be used by the shlink-list-short-urls bundle (in this case the name of the previously created Shlink instance).
38+
39+
7. Check the nodecg logs
40+
41+
You should see an error or a success message and the amount of configured short urls on the Shlink server.
42+
43+
_Note:_ When listing short urls - like this sample does - be aware that the amount of short urls might be limited by the [API key role](https://shlink.io/documentation/api-docs/api-key-roles/).

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ nav:
7777
- sACN Receiver sample: samples/sacn-receiver.md
7878
- sACN Sender sample: samples/sacn-sender.md
7979
- Serial sample: samples/serial.md
80+
- Shlink sample: samples/shlink.md
8081
- Slack sample: samples/slack.md
8182
- Spotify sample: samples/spotify.md
8283
- SQL sample: samples/sql.md

0 commit comments

Comments
 (0)