budibase/packages/server/src/index.js

14 lines
341 B
JavaScript
Raw Normal View History

2020-06-15 18:06:54 +02:00
const { resolve } = require("path")
async function runServer() {
2020-06-15 18:08:59 +02:00
const budibaseDir = "~/.budibase"
2020-06-15 18:06:54 +02:00
process.env.BUDIBASE_DIR = resolve(budibaseDir)
2020-06-15 18:08:59 +02:00
const server = await require("./app")()
2020-06-15 18:06:54 +02:00
server.on("close", () => console.log("Server Closed"))
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
}
2020-06-15 18:08:59 +02:00
runServer()