15 lines
316 B
TypeScript
15 lines
316 B
TypeScript
import app from "./src/app";
|
|
const port = process.env.OCME_PORT || 5001; //bun will automatically grab this as well.
|
|
Bun.serve({
|
|
port,
|
|
fetch: app.fetch,
|
|
hostname: "0.0.0.0",
|
|
});
|
|
|
|
await Bun.build({
|
|
entrypoints: ["./index.js"],
|
|
outdir: "../../dist/ocme",
|
|
});
|
|
|
|
console.log(`ocme is running on port ${port}`);
|