[del] env

This commit is contained in:
建喵 2023-09-01 18:02:06 +08:00
parent a554bb8473
commit 92be7cc355
5 changed files with 14 additions and 13 deletions

9
.env
View File

@ -1,9 +0,0 @@
URLPATH = /linewebhook
PORT = 3003
# DB----------------------------------------------
DB_HOST = 192.168.0.15
DB_PORT = 3307
DB_USER = jianmiau
DB_PASSWORD = VQ*ZetC7xcc9%dTW
DB_DATABASE = badminton

3
.vscode/launch.json vendored
View File

@ -12,7 +12,8 @@
"address": "127.0.0.1:9229/87f42d5b-97bf-4d25-a4d7-37306985459a",
"port": 9229,
"localRoot": "${workspaceFolder}",
"remoteRoot": "D:/Project/Test/Test_Web/GuessWhoIAmS",
// "remoteRoot": "D:/Project/Test/Test_Web/GuessWhoIAmS",
"remoteRoot": "E:/Project/Test/Test_NodeJS/GuessWhoIAmS",
// "remoteRoot": "/volume1/homes/JianMiau/www/line-bot-ts",
"skipFiles": [
"<node_internals>/**"

View File

@ -6,7 +6,7 @@
"scripts": {
"start": "npm run dev",
"dev": "tsrpc-cli dev",
"debug": "nodemon --exec \"node --require ts-node/register --inspect=127.0.0.1:9229 src/index.ts\"",
"debug": "set NODE_ENV=dev && nodemon --exec \"node --require ts-node/register --inspect=127.0.0.1:9229 src/index.ts\"",
"build": "tsrpc-cli build",
"doc": "tsrpc-cli doc",
"test": "mocha test/**/*.test.ts",
@ -25,6 +25,7 @@
},
"dependencies": {
"dayjs": "^1.11.9",
"dotenv": "^16.3.1",
"tsrpc": "^3.4.12"
}
}
}

View File

@ -1,5 +1,6 @@
import dayjs from "dayjs";
import "dayjs/locale/zh-tw";
import dotenv from "dotenv";
import * as path from "path";
import { WsServer } from "tsrpc";
import { BaseEnumerator } from "./Engine/CatanEngine/CoroutineV2/Core/BaseEnumerator";
@ -10,10 +11,12 @@ import { serviceProto } from './shared/protocols/serviceProto';
BaseEnumerator.Init();
dayjs.locale("zh-tw")
dotenv.config();
// Create the Server
const port: number = +process.env.PORT || 3000
export const server = new WsServer(serviceProto, {
port: 3003,
port: port,
// Remove this to use binary mode (remove from the client too)
json: true
});

View File

@ -327,6 +327,11 @@ diff@^4.0.1:
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
dotenv@^16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
editorconfig@^0.15.0:
version "0.15.3"
resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5"