1
0
Fork 0

GarageApp and wisher projects added

GarageApp set up with translation with i18n, this required changes to
routes in src/index.tsx
This commit is contained in:
Techognito 2025-08-06 10:17:09 +02:00
parent 5469a93a57
commit fc84d8c479
17 changed files with 529 additions and 1 deletions

View file

@ -1,11 +1,28 @@
import { serve } from "bun";
import index from "./index.html";
import wisher from "./wisher/index.html"
import GarageApp from "./GarageApp/index.html"
import locales from "./GarageApp/locales/index"
const server = serve({
routes: {
// Serve index.html for all unmatched routes.
"/*": index,
"/wisher": wisher,
"/wisher/*": wisher,
"/GarageApp": GarageApp,
"/GarageApp/*": GarageApp,
"/GarageApp/locales/:lng/translation.json": async req => {
const lng = req.params.lng;
const ns = req.params.ns;
const path = `src/GarageApp/locales/${lng}/translation.json`
console.log(`${lng}, ${ns}`);
console.log(process.cwd());
return new Response(Bun.file(path))
},
"/api/hello": {
async GET(req) {
return Response.json({