diff --git a/config.toml b/config.toml index a66190a5..c320ecf6 100644 --- a/config.toml +++ b/config.toml @@ -166,8 +166,8 @@ disableAliases = true for = "/**" [server.headers.values] Access-Control-Allow-Origin = "*" - # TODO: Proxy /api requests to netlify-lambda's local server for each function + # TODO: Proxy /api requests to netlify-lambda's local server (port 9337) for each function [[server.redirects]] from = "/api/**" - to = "http://localhost:9000/" + to = "http://localhost:9337/" status = 200 diff --git a/package.json b/package.json index 7d8444d1..9945e5ac 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "build": "run-s build:** minify", "build:hugo": "hugo --gc --cleanDestinationDir --verbose", "build:functions": "netlify-lambda build functions", - "start": "run-p start:hugo", + "start": "run-p start:hugo start:functions", "start:hugo": "hugo server --disableFastRender --buildDrafts --buildFuture --port 1337 --bind 0.0.0.0 --verbose", - "start:netlify": "netlify dev --live", + "start:functions": "netlify-lambda serve --port 9337 functions", "start:docker": "docker run --rm -v $(pwd):/src -p 1337:1337 $(docker build --no-cache -q .)", "minify": "run-s minify:**", "minify:html": "html-minifier --html5 --collapse-whitespace --collapse-boolean-attributes --preserve-line-breaks --minify-css --remove-comments --file-ext html --input-dir public --output-dir public **/*.html",