Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
I'm doing a tutorial(https://serverless-stack.com/) and when I get to the part where I interact with the backend with my react I get a CORS error saying that it can not communicate with my backend. Does someone have an idea how I would fix this? I read about adding the 'Access-Control-Allow-Origin' header but I am confused to where I should put it ?
Hi there, I'm one of the authors of the Serverless Stack guide. You can compare the serverless.yml settings to the one from the guide https://github.com/AnomalyInnovations/serverless-stack-demo-api/blob/master/services/notes/serverless.yml and also make sure the headers are being set correctly https://github.com/AnomalyInnovations/serverless-stack-demo-api/blob/master/services/notes/libs/handler-lib.js#L27.
Related posts
- Serverless can benefit from not being so Lambda-centric
- Lift 1.9: support for FIFO queues (Lift integrates CDK in serverless.yml)
- Please recommend tutorial for React, Next, AWS
- Lift 1.0: AWS CDK constructs in the Serverless Framework
- I made an AWS API template using NodeJS with fully automated infrastructure deployment - let me know what you think :)