From 120849a410e6f097d813a1ce94ec6006c28c4b4f Mon Sep 17 00:00:00 2001 From: Taskeren Date: Sun, 10 Dec 2023 14:48:54 +0800 Subject: [PATCH] updated server ip --- server.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/server.ts b/server.ts index d54d38b..54c8d99 100644 --- a/server.ts +++ b/server.ts @@ -9,6 +9,22 @@ import * as fs from "fs" const sw = require("js-sensitivewords") +/** + * The server address without graphql path. + */ +const serverAddr = "http://47.97.110.29:10443" + +/* + +2023 (c) Explode Team + +This script is licensed under MIT. + +This script is used to create a user-friendly website for registering the accounts of Dynamite Explode, +with ability to block users with invalid or illegal names. + +*/ + initSensitiveWordList() const app = express() @@ -66,6 +82,7 @@ app.post("/register", async (req: Request, res: Response) => { return res.status(500).send("出错啦,注册失败了。") } } catch (e) { + console.error(e) return res.status(500).send("服务器错误,请联系管理员!") } }) @@ -82,7 +99,8 @@ type HasId = { async function explode_graphql(query: string) { return _axios.post( - "http://34.92.242.92:10443/graphql", + `${serverAddr}/graphql`, + // "http://192.168.1.199:10443/graphql", JSON.stringify({ operationName: "", query: query, @@ -97,6 +115,7 @@ async function explode_graphql(query: string) { } async function explode_register(username: string, password: string) { + console.log(`Registering ${username}`) let response = await explode_graphql<{ data: { registerUser: HasId