增加初始化依赖目录及文件

This commit is contained in:
whyour
2021-11-18 21:47:36 +08:00
parent 19e7c238f6
commit 2eed5cba14
3 changed files with 48 additions and 6 deletions
-6
View File
@@ -32,16 +32,10 @@ const authDbFile = path.join(rootPath, 'db/auth.db');
const dependenceDbFile = path.join(rootPath, 'db/dependence.db');
const versionFile = path.join(rootPath, 'src/version.ts');
const configFound = dotenv.config({ path: confFile });
if (envFound.error) {
throw new Error("⚠️ Couldn't find .env file ⚠️");
}
if (configFound.error) {
throw new Error("⚠️ Couldn't find config.sh file ⚠️");
}
export default {
port: parseInt(process.env.PORT as string, 10),
cronPort: parseInt(process.env.CRON_PORT as string, 10),