chore: biome
This commit is contained in:
+8
-8
@@ -5,18 +5,18 @@ import { db } from "./db/database.js";
|
||||
const app = express();
|
||||
|
||||
app.get("/hello", (_, res) => {
|
||||
res.send("Hello Vite + React + TypeScript!");
|
||||
res.send("Hello Vite + React + TypeScript!");
|
||||
});
|
||||
|
||||
app.get("/api/announcements", async (_, res) => {
|
||||
const announcements = await db
|
||||
.selectFrom("announcements")
|
||||
.select(["id", "title", "text", "publication_date", "image"])
|
||||
.orderBy("announcements.publication_date", "desc")
|
||||
.execute();
|
||||
res.json(announcements);
|
||||
const announcements = await db
|
||||
.selectFrom("announcements")
|
||||
.select(["id", "title", "text", "publication_date", "image"])
|
||||
.orderBy("announcements.publication_date", "desc")
|
||||
.execute();
|
||||
res.json(announcements);
|
||||
});
|
||||
|
||||
ViteExpress.listen(app, 3000, () =>
|
||||
console.log("Server is listening on port 3000..."),
|
||||
console.log("Server is listening on port 3000..."),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user