You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
greenvironment-server/src/index.ts

19 lines
384 B
TypeScript

import * as fsx from "fs-extra";
import App from "./app";
const configPath = "config.yaml";
const defaultConfig = __dirname + "/default-config.yaml";
/**
* async main function wrapper.
*/
(async () => {
if (!(await fsx.pathExists(configPath))) {
await fsx.copy(defaultConfig, configPath);
}
const app = new App();
await app.init();
app.start();
})();