18 lines
372 B
TypeScript
18 lines
372 B
TypeScript
import { ConsulConf } from "./utils/consul";
|
|
|
|
class Run {
|
|
|
|
initConsul!: ConsulConf;
|
|
|
|
constructor() {
|
|
// 启动 Consul
|
|
this.initConsul = new ConsulConf({
|
|
host: '127.0.0.1',
|
|
port: "8500",
|
|
promisify: true, // 是否使用 promise 风格
|
|
secure: false, // 是否启用https
|
|
});
|
|
}
|
|
}
|
|
|
|
new Run() |