Feature | Status | Note |
---|---|---|
Login | ✔️ | Implemented with Discord Login |
Sessions | ➖ | Solved using Cookies |
VIP / Mod | ✔️ | CTRL SHIFT F to open Key Menu |
Multiple Colors | ✔️ | Free Coloring and Set coloring. |
Discord Config | ✔️ | moved into server.json |
Toggle Login | ❌ | Currently there's no Option to turn off Discord Auth |
Scroll Lag | ❗ | was caused by the redrawing, removed with the useles border. |
-
git clone [email protected]:oOHiyoriOo/MiraiPlace.git
-
Change in
./settings
:place.json
server.json
-
npm i
in the main dir. -
node server.js
-
Profit
server {
server_name place.example.com; # Replace with your domain name
location / {
proxy_pass http://SERVERIP:PORT; # Replace with the actual address of your Node.js server
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
SSL needs to be enable for the Clipboard function to work! Certbot can be used to enable SSL
{
"colors": [ // configure the colors you allow the user to use (ignore if you want to use free colors.)
"#9D37A8",
"#47C1E5",
"#F28425",
"#72CF53",
"#F2C94C",
"#D1314F",
"#4F6D7A",
"#000000",
"#FF0000",
"#00FF00",
"#0000FF",
"#FFFF00",
"#FF00FF",
"#00FFFF",
"#FFFFFF"
],
"cooldown": 5000, // cooldown in MS
"width": 1920, // px height and width of the canvas
"height": 1080
}
{
"host": "127.0.0.1", // the host to listen on, most of the time you want '0.0.0.0'
"port": 8080, // the port is should listen on.
"database": ":memory:", // the database to use, this can be :memory: to be RAM only or a filename like 'canvas.sql'
"jwt_secret":"SuperSecretToken4242", // the secret used to encrypt the JWT token
"free_colors":true, // this enables or disabled the color picker.
"jwt_expiry": 86400, // how long should the JWT token eist? in generel discord tokens are valid for 7 days, you should keep this lower.
"discoprd_auth_url": "https://discord.com/api/oauth2/authorize?client_id=xxxxx&redirect_uri=http://xxxx/auth&response_type=token&scope=identify" // discord auth url.
}
You can get the AUTH URL here: Discord Dev Portal
ban('DISCORDID')
ban a user by his Discord ID (can be found in the Terminal after the Name)
unban('DISCORDID')
unban user by it's ID
getkey()
generates a VIP / Mod Key, can be used by pressing CTRL SHIFT F on the canvas.
shutdown()
can be used to stop the server (for some reason doesn't work every time, ^C
is a better Solution )