New to Netlify, and I am trying to get the local server to load the index.html file.
My netlify.toml file looks like this:
[dev]
command = "npm run serve"
functions = "lambda"
publish = "src/"
[build]
functions = "lambda"
publish = "src/"
# The following redirect is intended for use with most SPAs that handle
# routing internally.
[[redirects]]
from = "/*"
to = "index.html"
status = 200
[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"
I also tried putting in a _redirects file with
/* /index.html 200
If I got to http://localhost:9000/ I get the message “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.”
How do I get the root to redirect to index.html?