create-react-app-lambda
create-react-app-lambda copied to clipboard
error: lambda functions are not working in localhost
Steps to repeat error:
- download repo to desktop
-
npm install - in one terminal:
npm run start - on another terminal
npm run start:lambda
in the browser, at localhost 3000, press the buttons to call the lambda functions:
-
error in console:
VM271:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 -
in browser url
http://localhost:9000/.netlify/functions/helloresponds with hello world. -
in browser url
http://localhost:9000/.netlify/functions/async-dadjokeresponds with{"msg":"Request failed with status code 503"}(think that's expected).
use this
https://github.com/Kirbyasdf/netlify-react-lambda-node-boilerplate