Initial commit: Apothecary v0.4.0

This commit is contained in:
2026-05-03 20:19:26 -04:00
commit 027cf032be
55 changed files with 14678 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import cors from "cors";
import express from "express";
import { seedIfEmpty } from "./seed.js";
import { bootstrapRouter } from "./routes/bootstrap.js";
import { productsRouter } from "./routes/products.js";
import { catalogRouter } from "./routes/catalog.js";
seedIfEmpty();
const app = express();
app.use(cors());
app.use(express.json({ limit: "1mb" }));
app.use("/api", bootstrapRouter);
app.use("/api", productsRouter);
app.use("/api", catalogRouter);
const PORT = Number(process.env.PORT ?? 4000);
app.listen(PORT, () => {
console.log(`[apothecary] api listening on http://localhost:${PORT}`);
});