'Using aws chalice to build a single page application?
Has anyone here ever worked with chalice? Its an aws tool for creating api's. I want to use it to create a single page application, but Im not sure how to actually serve html from it. I've seen videos where its explored, but I can't figure out how they actually built the thing. Anyone have any advice on where to go, how to start this?
Solution 1:[1]
Add Response from Chalice and the use it to set the response headers and you're g2g.
from chalice import Chalice, Response
return Response(template, status_code=200, headers={"Content-Type": "text/html", "Access-Control-Allow-Origin": "*"})
I read about it here;
https://medium.com/@tim_33529/creating-a-serverless-blog-with-chalice-bdc39b835f75
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ddtraveller |
