File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,18 @@ export const api = new sst.aws.Function("Api", {
2222 handler : "app/function/src/api.handler" ,
2323 link : [ auth , postgres , ...AllSecrets ] ,
2424 permissions : [ { actions : [ "sts:*" ] , resources : [ "*" ] } ] ,
25- url : true ,
25+ url : {
26+ route : {
27+ router,
28+ domain : `api-${ domain } ` ,
29+ } ,
30+ } ,
2631} )
27- router . route ( "api-" + domain , api . url )
2832
29- const site = new sst . aws . StaticSite ( "Web" , {
30- cdn : false ,
33+ new sst . aws . StaticSite ( "Web" , {
34+ route : {
35+ router,
36+ } ,
3137 build : {
3238 command : "bun run build" ,
3339 output : "dist/client" ,
@@ -40,4 +46,3 @@ const site = new sst.aws.StaticSite("Web", {
4046 } ,
4147 path : "app/web" ,
4248} )
43- router . routeSite ( domain , site )
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ declare module "sst" {
5151 }
5252 "Web" : {
5353 "type" : "sst.aws.StaticSite"
54+ "url" : string
5455 }
5556 "Zero" : {
5657 "service" : string
You can’t perform that action at this time.
0 commit comments