mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-10-14 21:39:19 +00:00
Compare commits
No commits in common. "aad87d4d7e6effb4e8828e0bca56d6b8807ab1f8" and "0f303dfc5c5a372d666aa28ea2f76ea4942fb98a" have entirely different histories.
aad87d4d7e
...
0f303dfc5c
@ -1,4 +1,7 @@
|
||||
PORT=4000
|
||||
DEBUG=true
|
||||
RD_PORT=6379
|
||||
RD_ADD=127.0.0.1
|
||||
WS_SECRET=114514
|
||||
WS_PORT=4001
|
||||
TOKEN=54188
|
||||
|
21
LICENSE
21
LICENSE
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Crystelf
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "crystelf-core",
|
||||
"version": "1.0.0",
|
||||
"description": "crystelf - working together for a bright future",
|
||||
"author": "Jerryplusy",
|
||||
"name": "nest-backend",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
|
@ -32,7 +32,13 @@ export class AppConfigService implements OnModuleInit {
|
||||
|
||||
private checkRequiredVariables(): void {
|
||||
this.logger.log('检查必要环境变量..');
|
||||
const requiredVariables = ['RD_PORT', 'RD_ADD', 'WS_SECRET'];
|
||||
const requiredVariables = [
|
||||
'PORT',
|
||||
'RD_PORT',
|
||||
'RD_ADD',
|
||||
'WS_SECRET',
|
||||
'WS_PORT',
|
||||
];
|
||||
|
||||
requiredVariables.forEach((key) => {
|
||||
const value = this.nestConfigService.get(key);
|
||||
|
@ -27,7 +27,7 @@ export class PathService {
|
||||
userData: path.join(this.baseDir, 'private/data'),
|
||||
package: path.join(this.baseDir, 'package.json'),
|
||||
modules: path.join(this.baseDir, 'src/modules'),
|
||||
words: path.join(this.baseDir, 'private/words/src'),
|
||||
words: path.join(this.baseDir, 'private/word'),
|
||||
};
|
||||
|
||||
return type ? mappings[type] : this.baseDir;
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
import { AppConfigService } from '../../config/config.service';
|
||||
import { WsMessageHandler } from './ws-message.handler';
|
||||
|
||||
@WebSocketGateway({
|
||||
@WebSocketGateway(7001, {
|
||||
cors: { origin: '*' },
|
||||
driver: 'ws',
|
||||
})
|
||||
|
@ -33,12 +33,12 @@ async function bootstrap() {
|
||||
const document = () => SwaggerModule.createDocument(app, config);
|
||||
SwaggerModule.setup('docs', app, document);
|
||||
app.useWebSocketAdapter(new WsAdapter(app));
|
||||
await app.listen(6868);
|
||||
await app.listen(7000);
|
||||
await systemService.checkUpdate().catch((err) => {
|
||||
Logger.error(`自动更新失败: ${err?.message}`, '', 'System');
|
||||
});
|
||||
}
|
||||
bootstrap().then(() => {
|
||||
Logger.log(`API服务已启动:http://localhost:6868/api`);
|
||||
Logger.log(`API文档: http://localhost:6868/docs`);
|
||||
Logger.log(`API服务已启动:http://localhost:7000/api`);
|
||||
Logger.log(`API文档: http://localhost:7000/docs`);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user