Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .example-config.toml

This file was deleted.

13 changes: 13 additions & 0 deletions .example.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[cors]
allowed_origins_exact = ["http://localhost:8000"]
allowed_origins_regex = ["^http://localhost:\\d{4}$"]
allowed_methods = ["GET", "POST"]
allow_credentials = true

[oauth.discord]
client_id = "DISCORD_CLIENT_ID"
redirect_uri = "http://localhost:8000/v1/oauth2/discord/callback"

[oauth.roblox]
client_id = "ROBLOX_CLIENT_ID"
redirect_uri = "http://localhost:8000/v1/oauth2/roblox/callback"
21 changes: 20 additions & 1 deletion .example.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
# Discord OAuth2 client secret, you can get this from the Discord Developer Portal
DISCORD_CLIENT_SECRET="your_discord_client_secret"

# Roblox OAuth2 client secret, you can get this from the Roblox Creator Portal
ROBLOX_CLIENT_SECRET="your_roblox_client_secret"

# A 32 byte encryption key, you can generate one with `openssl rand -base64 24`
ENCRYPTION_KEY="your_encryption_key"

# Database
DB_DRIVER='postgres'
# Make sure the db name matches the one set for DbConn in src/lib.rs
ROCKET_DATABASES='{db_name={url="postgres://user:password@localhost:5432/db_name"}}'
DB_NAME='db_name'
DB_USER='user'
DB_PASSWORD='password'
DB_HOST='localhost'
DB_PORT='5432'

# Use the variables above to construct the connection url
DATABASE_URL="${DB_DRIVER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}"
ROCKET_DATABASES="{${DB_NAME}={url=\"${DATABASE_URL}\"}}"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
/.pg-dev-data
/.env
/config.toml
/Cargo.lock
/.env
Loading
Loading