token cache
This commit is contained in:
@@ -2,10 +2,13 @@ import { App } from '@kevisual/router';
|
||||
import fs from 'fs';
|
||||
import { getConfig, getPidList, pidFilePath, checkFileExists } from './module/get-config.ts';
|
||||
import { sequelize } from './module/sequelize.ts';
|
||||
import { spawn } from 'child_process';
|
||||
export { sequelize };
|
||||
|
||||
export const app = new App();
|
||||
export const app = new App({
|
||||
serverOptions: {
|
||||
httpType: 'https',
|
||||
},
|
||||
});
|
||||
|
||||
// 处理进程退出或中断信号,确保删除 pid 文件
|
||||
const cleanUp = () => {
|
||||
@@ -42,7 +45,7 @@ export const createApp = async () => {
|
||||
}
|
||||
fs.writeFileSync(pidFilePath, process.pid.toString());
|
||||
app.listen(21015, () => {
|
||||
console.log('Server is running on port 21015', 'http://localhost:21015/api/router', 'server id', process.pid);
|
||||
console.log('Server is running on port 21015', 'https://localhost:21015/api/router', 'server id', process.pid);
|
||||
});
|
||||
// import('./route.ts');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user