A Fudge Dice rolling room programmed in Go.
|
|
||
|---|---|---|
| app/gofudge | ||
| .gitattributes | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
| run.sh | ||
GoFudge
A Fudge Dice rolling room programmed in Go
License
Prerequisites
- The version of Go used to test the code in this repository is 1.25.3.
Get started
-
run the following commands:
go mod tidy; go build -o bin/main ./app/gofudge/main.gothen./bin/mainto start the server on port 8080. -
Visit http://localhost:8080 in your browser.
-
Upon visiting the URL you will be created with a username entry and Create room button. After that you will be in the room.
-
(If you are hosting this publicly) You can copy the room link in the top right hand corner and share it to anyone. They will be prompted to also pick a username.
-
From there you may increase/decrease the modifier as needed for the skill you are rolling for.
Podman/Docker
- If you want to use this with Docker, replace all
podmancommands inrun.shinstances withdocker - Use
run.shscript which will start the site on port12007and to make it public change the8080port in the NGINX config to12007or change the port in therun.shscript how you like. - To use it locally, same as above but visit http://localhost:12007 instead.
Config for NGINX to use as a website:
upstream gofudge {
server 127.0.0.1:8080;
server [::1]:8080;
}
server {
listen 80;
listen [::1]:80;
server_name fudge.example.com;
location / {
proxy_pass http://gofudge;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}