Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
587 B

const send = require("koa-send");
const { resolve } = require("path")
// either serve the builder or serve the actual app index.html
const builderPath = resolve(process.cwd(), "builder")
exports.serveBuilder = async function(ctx) {
await send(ctx, ctx.file, { root: builderPath })
}
exports.serveApp = async function(ctx) {
// resolve unauthenticated page if so
await send(ctx, "/index.html", { root: ctx.publicPath })
// resolve main page if user authenticated
}
exports.serveComponentLibrary = async function(ctx) {
await send(ctx, "/index.html", { root: builderPath })
}