20 lines
452 B
TypeScript
20 lines
452 B
TypeScript
import { drizzle } from "drizzle-orm/bun-sqlite";
|
|
import express from "express";
|
|
import path from "path";
|
|
|
|
const app = express();
|
|
const port = process.env.PORT || 3000;
|
|
|
|
const db = drizzle(process.env.DB_FILE_NAME!);
|
|
|
|
app.use("/static", express.static(path.join(__dirname, "public")));
|
|
|
|
// landing page
|
|
app.get("/", (req, res) => {
|
|
res.send("landing page");
|
|
});
|
|
|
|
// start server
|
|
app.listen(port, () => {
|
|
console.log(`Running on port ${port}`);
|
|
});
|