mirror of
https://github.com/woodchen-ink/Random-Api.git
synced 2025-07-19 06:22:03 +08:00
Update app.js
This commit is contained in:
parent
037dbb7127
commit
8d9c0dfc87
@ -7,6 +7,11 @@ import 'winston-daily-rotate-file';
|
||||
import cluster from 'cluster';
|
||||
import { cpus } from 'os';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
// 处理 __dirname
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const numCPUs = cpus().length;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user