feat: bun app foundation, sample data, shared credits/audio, mockup stubs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d52ac63afe
commit
10ce858b31
42 files changed
+839
No files matched your search
@@ -0,0 +1,41 @@
|
||||
import type { Server } from "bun";
|
||||
import home from "./index.html";
|
||||
import m0 from "./mockups/01-editorial/index.html";
|
||||
import m1 from "./mockups/02-vertical-story/index.html";
|
||||
import m2 from "./mockups/03-transit-map/index.html";
|
||||
import m3 from "./mockups/04-greek-frieze/index.html";
|
||||
import m4 from "./mockups/05-score/index.html";
|
||||
import m5 from "./mockups/06-constellation/index.html";
|
||||
import m6 from "./mockups/07-sea-voyage/index.html";
|
||||
|
||||
export function startServer(port: number): Server<undefined> {
|
||||
return Bun.serve({
|
||||
port,
|
||||
routes: {
|
||||
"/": home,
|
||||
"/mockups/01-editorial/": m0,
|
||||
"/mockups/01-editorial": Response.redirect("/mockups/01-editorial/", 302),
|
||||
"/mockups/02-vertical-story/": m1,
|
||||
"/mockups/02-vertical-story": Response.redirect("/mockups/02-vertical-story/", 302),
|
||||
"/mockups/03-transit-map/": m2,
|
||||
"/mockups/03-transit-map": Response.redirect("/mockups/03-transit-map/", 302),
|
||||
"/mockups/04-greek-frieze/": m3,
|
||||
"/mockups/04-greek-frieze": Response.redirect("/mockups/04-greek-frieze/", 302),
|
||||
"/mockups/05-score/": m4,
|
||||
"/mockups/05-score": Response.redirect("/mockups/05-score/", 302),
|
||||
"/mockups/06-constellation/": m5,
|
||||
"/mockups/06-constellation": Response.redirect("/mockups/06-constellation/", 302),
|
||||
"/mockups/07-sea-voyage/": m6,
|
||||
"/mockups/07-sea-voyage": Response.redirect("/mockups/07-sea-voyage/", 302),
|
||||
},
|
||||
development: process.env.NODE_ENV !== "production",
|
||||
fetch() {
|
||||
return new Response("Not found", { status: 404 });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (import.meta.main) {
|
||||
const server = startServer(Number(process.env.PORT ?? 3000));
|
||||
console.log(`Listening on ${server.url}`);
|
||||
}
|
||||
Reference in new issue
Block a user