mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
18 lines
501 B
JavaScript
18 lines
501 B
JavaScript
#!/usr/bin/env node
|
|
const fs = require('fs')
|
|
const path = require('path')
|
|
const tmpPath = require('os').tmpdir()
|
|
|
|
async function start() {
|
|
// 检测是否存在 anonymous_token 文件,没有则生成
|
|
if (!fs.existsSync(path.resolve(tmpPath, 'anonymous_token'))) {
|
|
fs.writeFileSync(path.resolve(tmpPath, 'anonymous_token'), '', 'utf-8')
|
|
}
|
|
const generateConfig = require('./generateConfig')
|
|
await generateConfig()
|
|
require('./server').serveNcmApi({
|
|
checkVersion: true,
|
|
})
|
|
}
|
|
start()
|