From 497262340097cdd958980f7e9f16a3373da20298 Mon Sep 17 00:00:00 2001 From: davidwells Date: Mon, 11 Jun 2018 17:41:04 -0700 Subject: [PATCH] run local dev server and react-scripts in same session --- package.json | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4e0f367..7468e74 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,23 @@ "react-scripts": "1.1.4" }, "scripts": { - "start": "react-scripts start", "bootstrap": "node ./init-faunadb.js", - "buildFunctions": "netlify-lambda build functions -c ./webpack.config.js", + "start": "concurrently \"react-scripts start\" \"npm run startServer\"", + "startServer": "netlify-lambda serve functions -c ./webpack.config.js", "build": "npm run buildFunctions && react-scripts build", + "buildFunctions": "netlify-lambda build functions -c ./webpack.config.js", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" }, "devDependencies": { "netlify-lambda": "^0.4.0" + }, + "proxy": { + "/.netlify/functions": { + "target": "http://localhost:9000", + "pathRewrite": { + "^/\\.netlify/functions": "" + } + } } }