| 1 | import { defineConfig, RenderRoute, ServerRoute } from "@octanejs/vite-plugin"; |
| 2 | |
| 3 | export default defineConfig({ |
| 4 | router: { |
| 5 | routes: [ |
| 6 | new ServerRoute({ |
| 7 | path: "/api/hello", |
| 8 | methods: ["GET"], |
| 9 | handler: (context) => { |
| 10 | return Response.json({ |
| 11 | marker: "OCTANE_AWS_API_MARKER", |
| 12 | echo: context.url.searchParams.get("echo"), |
| 13 | }); |
| 14 | }, |
| 15 | }), |
| 16 | new RenderRoute({ path: "/", entry: ["App", "/src/App.tsx"] }), |
| 17 | ], |
| 18 | }, |
| 19 | }); |