Server
The server provides the cup serve
command.
Basic usage
$ cup serve
INFO Starting server, please wait...
INFO ✨ Checked 8 images in 8862ms
INFO Ready to start!
HTTP GET / 200 in 0ms
HTTP GET /assets/index.js 200 in 3ms
HTTP GET /assets/index.css 200 in 0ms
HTTP GET /api/v3/json 200 in 0ms
This will launch the server on port 8000
. To access it, visit http://<YOUR_IP>:8000
(replace <YOUR_IP>
with the IP address of the machine running Cup.)
💡
The URL http://<YOUR_IP>:8000/api/v3/json
is also available for usage with integrations.
Use a different port
Pass the -p
argument with the port you want to use
$ cup serve -p 9000
INFO Starting server, please wait...
INFO ✨ Checked 8 images in 8862ms
INFO Ready to start!
HTTP GET / 200 in 0ms
HTTP GET /assets/index.js 200 in 3ms
HTTP GET /assets/index.css 200 in 0ms
HTTP GET /api/v3/json 200 in 0ms
Usage with Docker
If you’re using the Docker image, just replace all occurences of cup
in the examples with docker run -tv /var/run/docker.sock:/var/run/docker.sock -p <PORT>:<PORT> ghcr.io/sergi0g/cup
, where <PORT>
is the port Cup will be using.
For example, this:
$ cup serve -p 9000
becomes:
$ docker run -tv /var/run/docker.sock:/var/run/docker.sock -p 9000:9000 ghcr.io/sergi0g/cup serve -p 9000
Last updated on