From ab4a2eb4231546d7e4807a2cded8a380946ce90c Mon Sep 17 00:00:00 2001 From: DavidWells Date: Wed, 20 Jun 2018 20:54:56 -0700 Subject: [PATCH] add omnipotent prebuild for database setup --- package.json | 1 + scripts/check-for-fauna-key.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8babef4..64e1f8e 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "start": "npm-run-all --parallel checkForFaunaKey startApp startServer", "startApp": "react-scripts start", "startServer": "netlify-lambda serve functions -c ./webpack.config.js", + "prebuild": "echo 'setup faunaDB' && npm run bootstrap", "build": "npm-run-all --parallel build:**", "build:app": "react-scripts build", "build:functions": "netlify-lambda build functions -c ./webpack.config.js", diff --git a/scripts/check-for-fauna-key.js b/scripts/check-for-fauna-key.js index 4a8fb84..1079434 100644 --- a/scripts/check-for-fauna-key.js +++ b/scripts/check-for-fauna-key.js @@ -8,7 +8,7 @@ function clear(){ }); } function checkForFaunaKey() { - if (!process.env.FAUNADB_SECRETz) { + if (!process.env.FAUNADB_SECRET) { console.log(chalk.yellow('Required FAUNADB_SECRET enviroment variable not found.')) console.log(` =========================