1
0
Fork 0
mirror of synced 2024-07-02 13:01:09 +12:00
budibase/packages/server/index.js

26 lines
627 B
JavaScript

const app = require("./app")
const buildAppContext = require("./initialise/buildAppContext")
const process = require("process")
let configIsNext = false
let configPath = "./config"
for (let arg of process.argv) {
if (arg === "-c") {
configIsNext = true
}
if (configIsNext) {
configPath = arg
}
}
const config = require(configPath)
;(async () => {
// const bbContext = await buildAppContext(config(), true)
const bbContext = { config: config() }
const server = await app(bbContext)
server.on("listening", () => {
console.log(`Budibase Server listening on port ${bbContext.config.port}`)
})
})()