修正一下
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
// 宝塔环境下的Node项目启动脚本
|
// 宝塔环境下的Node项目启动脚本
|
||||||
const { spawn } = require('child_process');
|
import { spawn } from 'child_process';
|
||||||
const path = require('path');
|
import path from 'path';
|
||||||
const fs = require('fs');
|
import fs from 'fs';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
// 获取当前文件的目录路径
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
// 获取项目根目录
|
// 获取项目根目录
|
||||||
const rootDir = __dirname;
|
const rootDir = __dirname;
|
||||||
|
|||||||
Reference in New Issue
Block a user