mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 14:41:23 +08:00
update: anonymous_token配置抽离, 生成稳定性问题修复
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
const generateConfig = require('./generateConfig')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
async function start() {
|
||||
// 检测是否存在 anonymous_token 文件,没有则生成
|
||||
if (!fs.existsSync('./anonymous_token')) {
|
||||
fs.writeFileSync(path.resolve(__dirname, 'anonymous_token'), '', 'utf-8')
|
||||
}
|
||||
const generateConfig = require('./generateConfig')
|
||||
await generateConfig()
|
||||
require('./server').serveNcmApi({
|
||||
checkVersion: true,
|
||||
|
||||
Reference in New Issue
Block a user