34 lines
1.4 KiB
JavaScript
34 lines
1.4 KiB
JavaScript
"use strict";
|
|
/**
|
|
* HTTP API process — serves REST, optional WS disabled here by default.
|
|
*/
|
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const app_1 = __importDefault(require("../app"));
|
|
const config_1 = require("../config");
|
|
const appBootstrap_1 = require("../bootstrap/appBootstrap");
|
|
async function main() {
|
|
await (0, appBootstrap_1.bootstrapCore)({
|
|
startEngines: config_1.config.engineEnabled,
|
|
startPlatformMonitors: true,
|
|
});
|
|
app_1.default.listen(config_1.config.port, () => {
|
|
console.log(`[api] listening on port ${config_1.config.port}`);
|
|
console.log(`[api] engine inline=${config_1.config.engineEnabled} redis=${config_1.config.redis.enabled}`);
|
|
console.log(`TRON node: ${config_1.config.blockchain.tron.nodeUrl}`);
|
|
console.log(`Withdrawals broadcasting enabled: ${config_1.config.withdrawal.allowWithdrawals}`);
|
|
});
|
|
}
|
|
main().catch((e) => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
});
|
|
process.on('unhandledRejection', (reason) => {
|
|
console.error('[process] Unhandled promise rejection (continuing):', reason);
|
|
});
|
|
process.on('uncaughtException', (err) => {
|
|
console.error('[process] Uncaught exception (continuing):', err);
|
|
});
|
|
//# sourceMappingURL=api.js.map
|