Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

setup react with serverless stack

COPY// Deploy our React app
const site = new ReactStaticSite(stack, "ReactSite", {
  path: "frontend",
  environment: {
    REACT_APP_API_URL: api.url,
  },
});

// Show the URLs in the output
stack.addOutputs({
  SiteUrl: site.url,
  ApiEndpoint: api.url,
});
Source by serverless-stack.com #
 
PREVIOUS NEXT
Tagged: #setup #react #serverless #stack
ADD COMMENT
Topic
Name
7+2 =