alapa
Version:
A cutting-edge web development framework designed to revolutionize the way developers build modern web applications.
25 lines (24 loc) • 905 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const globals_1 = require("../../shared/globals");
const start_1 = require("./start");
const database_setup_1 = require("./database-setup");
const boot_1 = require("./boot");
function alapa(configuration) {
(0, boot_1.boot)(configuration);
return {
startServer: async (userHost, userPort) => {
if (userHost) {
globals_1.GlobalConfig.server.host = userHost;
}
if (userPort) {
globals_1.GlobalConfig.server.port = userPort;
}
await (0, database_setup_1.setupDatabase)();
const { host, port, server, app } = await (0, start_1.startServer)();
(0, boot_1.activateApp)(app);
return { server, app, host, port }; // Return the app, host, and port
},
};
}
exports.default = alapa;
;