UNPKG

env-manage-plugin

Version:

A dev env plugin that integrates an Express server with request proxying capabilities.

25 lines (24 loc) 771 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EnvManage = void 0; const tslib_1 = require("tslib"); const Config_js_1 = require("./Config.js"); const PostProxyServer_js_1 = tslib_1.__importDefault(require("./PostProxyServer.js")); class EnvManage { constructor(options = {}) { this.options = options; } async startIndependent(isPlugin = false) { const config = new Config_js_1.Config(isPlugin); await config .initConfig(this.options.config) .then(() => { console.log("Config file loaded"); new PostProxyServer_js_1.default(); }) .catch(() => { // todo 错误处理 }); } } exports.EnvManage = EnvManage;