Devin
02/10/2022, 2:02 PMthis.api = new sst.Api(this, "Api", {
customDomain: {
hostedZome: <http://myCoolSite.com|myCoolSite.com>,
domainName: <http://api.myCoolSite.com|api.myCoolSite.com>,
domainAlias: <http://www.api.myCoolSite.com|www.api.myCoolSite.com>,
}),
Will create an A record in route53 so you can request that api as <http://api.myCoolSite.com|api.myCoolSite.com>
.
then if you wanted to access that in a front end
const reactApp = new sst.ReactStaticSite(this, "ReactSite", {
path: "frontend",
environment: {
REACT_APP_API_URL: this.api.url,
My expectation was that this.api.url
would return <http://api.myCoolSite.com|api.myCoolSite.com>
.
Is that the expected behavior?Frank
this.api.customDomainUrl
will give u thatDevin
02/10/2022, 8:12 PMDevin
02/10/2022, 8:12 PMDevin
02/10/2022, 8:36 PMDevin
02/10/2022, 8:36 PM