made a template for the app to be
This commit is contained in:
34
.env.example
Normal file
34
.env.example
Normal file
@@ -0,0 +1,34 @@
|
||||
# ==========================================
|
||||
# WEB SERVER CONFIGURATIE
|
||||
# ==========================================
|
||||
PORT=3000
|
||||
NODE_ENV=development
|
||||
|
||||
SESSION_SECRET=very_long_very_strong_very_secret_secret
|
||||
|
||||
# ==========================================
|
||||
# MINECRAFT & RCON
|
||||
# ==========================================
|
||||
MC_HOST=mc.example.com
|
||||
MC_RCON_PORT=25575
|
||||
MC_RCON_PASSWORD=your_rcon_password
|
||||
|
||||
MC_LOG_PATH=/data/logs/latest.log
|
||||
|
||||
# ==========================================
|
||||
# OAUTH2 CONFIGURATION
|
||||
# ==========================================
|
||||
OAUTH_CLIENT_ID=jouw_authentik_client_id
|
||||
OAUTH_CLIENT_SECRET=jouw_authentik_client_secret
|
||||
|
||||
OAUTH_REDIRECT_URI=http://localhost:3000/auth/callback
|
||||
OAUTH_ISSUER_URL=https://authentik.jouwdomein.nl/application/o/minecraft-panel/
|
||||
|
||||
OAUTH_AUTHORIZATION_URL=https://authentik.jouwdomein.nl/application/o/authorize/
|
||||
OAUTH_TOKEN_URL=https://authentik.jouwdomein.nl/application/o/token/
|
||||
OAUTH_USERINFO_URL=https://authentik.jouwdomein.nl/application/o/userinfo/
|
||||
|
||||
# ==========================================
|
||||
# DOCKER API
|
||||
# ==========================================
|
||||
DOCKER_SOCK=/var/run/docker.sock
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package-lock.json
|
||||
node_modules/
|
||||
.env
|
||||
35
main.js
Normal file
35
main.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Imports
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Constant declaration
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Socket.io socket function
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Passport.js OAuth2/OICD handler
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Express Routes
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Run Express
|
||||
*/
|
||||
13
minecraft.js
Normal file
13
minecraft.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
Imports
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
helper functions (eg, getOnlinePlayers())
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
module.exports all those functions
|
||||
*/
|
||||
15
package.json
Normal file
15
package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"dockerode": "^5.0.0",
|
||||
"dotenv": "^17.4.2",
|
||||
"express": "^5.2.1",
|
||||
"express-session": "^1.19.0",
|
||||
"helmet": "^8.1.0",
|
||||
"minecraft-server-util": "^5.4.4",
|
||||
"passport": "^0.7.0",
|
||||
"passport-oauth2": "^1.8.0",
|
||||
"rcon-client": "^4.2.5",
|
||||
"socket.io": "^4.8.3",
|
||||
"tail": "^2.2.6"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user