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:
parent
5469a93a57
commit
fc84d8c479
17 changed files with 529 additions and 1 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue