refactor: 重构获取anonymous token以及xeapikey的获取

This commit is contained in:
Takanashi Hoshino
2026-09-13 11:13:56 +08:00
parent a8c781fd64
commit c478367c6c
11 changed files with 656 additions and 78 deletions
-4
View File
@@ -1,11 +1,7 @@
const fs = require('fs')
const path = require('path')
const tmpPath = require('os').tmpdir()
/** @type {import("express").Express & serverMod.ExpressExtension} */
let app
if (!fs.existsSync(path.resolve(tmpPath, 'anonymous_token'))) {
fs.writeFileSync(path.resolve(tmpPath, 'anonymous_token'), '', 'utf-8')
}
const serverMod = require('./server')
before(async () => {
const generateConfig = require('./generateConfig')