feat: Add api (#112)

Add the api route -> https://nexus.nestri.workers.dev/
This commit is contained in:
Wanjohi
2024-09-10 22:38:35 +03:00
committed by GitHub
parent df9f1cfe95
commit 1b1bedff36
21 changed files with 37 additions and 8 deletions

22
infra/api.ts Normal file
View File

@@ -0,0 +1,22 @@
import { isPermanentStage } from "./stage";
//TODO: Use this instead of wrangler
// export const api = new sst.cloudflare.Worker("apiApi", {
// url: true,
// handler: "packages/api/src/index.ts",
// // live: true,
// });
if (!isPermanentStage) {
new sst.x.DevCommand("apiDev", {
dev: {
command: "bun run dev",
directory: "packages/api",
autostart: true,
},
})
}
// export const outputs = {
// api: api.url
// }