mondaynightpoker-server is the backend application for the Monday Night Poker site (see: mondaynight.bid). The front-end code can be found at github.com/weters/mondaynightpoker-vue.
For more information about the architecture of this open-source project, see the architecture document.
- Acey Deucey
- Bourré
- Pass the Poop
- Poker
- Pot-Limit Texas Hold'em
- Little L
- Seven-card games
- Follow the Queen
- Baseball
- Seven-card Stud
- Low Card Wild
- Go 1.17+
- golangci-lint
- Docker
- Google reCAPTCHA v3 Secret
- Create the dev database
$ make dev-database
- Create your public and private keys for JWT signing
$ make keys
- Make an admin user
$ go run ./cmd/admin -c user
- Run the server
$ MNP_RECAPTCHA_SECRET=X go run ./cmd/server
- Verify the server is running
$ curl http://localhost:5000/health
- Start the Vue.js front-end. Repo can be found at github.com/weters/mondaynightpoker-vue
The service can be configured through two methods:
- YAML Configuration: By default, the service will look for
config.yaml
. You can also change the filename by setting aMNP_CONFIG_FILE
environment variable. - Environment Variables: All configuration settings can be set by environment variables. Every variable is prefixed by
MNP_
andcamelCase
is transformed toSNAKE_CASE
. Example,jwt.publicKey
will becomeMNP_JWT_PUBLIC_KEY
.
Any environment variables take precedence over values defined in YAML. The default configuration values are defined below.
host: https://mondaynight.bid
log:
level: info
disableAccessLogs: false
database:
dsn: postgres://postgres@localhost:5432/postgres?sslmode=disable
migrationsPath: ./sql
jwt:
publicKey: .keys/public.pem
privateKey: .keys/private.key
recaptchaSecret: '-'
startGameDelay: 10
playerCreateDelay: 60
email:
from: Monday Night Poker <no-reply@mondaynight.bid>
sender: no-reply@mondaynight.bid
username: dealer@mondaynight.bid
password: ""
host: mail.privateemail.com:587
templatesDir: templates
disable: false
You can generate a YAML file with the defaults by running:
$ go run ./cmd/generate-config