Revert "refactor: 优化serverless入口文件"

This reverts commit 1db354464f.
This commit is contained in:
MoeFurina
2026-06-18 22:50:51 +08:00
parent 1db354464f
commit 2c9da8507d
3 changed files with 6 additions and 33 deletions
+5 -3
View File
@@ -8,9 +8,11 @@ async function start() {
if (!fs.existsSync(path.resolve(tmpPath, 'anonymous_token'))) {
fs.writeFileSync(path.resolve(tmpPath, 'anonymous_token'), '', 'utf-8')
}
// 启动时更新anonymous_token
const generateConfig = require('./generateConfig')
await generateConfig()
// 启动时更新anonymous_token(Vercel 构建环境下跳过网络请求喵~)
if (!process.env.VERCEL_ENV) {
const generateConfig = require('./generateConfig')
await generateConfig()
}
require('./server').serveNcmApi({
checkVersion: true,
})