I’m using React + Webpack and i have Lambda working great with them when deployed to Netlify. But i can’t get them to work on dev (my Mac) at the same time.
I thought i need to use this: “dev”: “npm start; npm run start:lambda”, but when i run this, only the React dev server runs, but after i do CTRL + C the React dev closes and then Lambda runs.
Right spoke to soon don’t know why i thought it was working
when i access localhost:9000 i get this
You have requested the root of http://localhost:9000. This is likely a mistake. netlify-lambda serves functions at http://localhost:9000/.netlify/functions/your-function-name; please fix your code.
I’m not sure its actually possible for two things to run on the same port, seems to be a hotly debated question here:
You’d definitely want to find a way to get this working locally, if its possible, but I’m not sure we can confirm or deny this will work on our service at this time.
Hm then is it possible to have my start:lambda running but i want also to have a React page being displayed at the same time? Maybe i can’t run them at the same time as different app’s but how can i tell then my dev environment lambda to serve the React page?