update env key to FAUNADB_SERVER_SECRET
This commit is contained in:
parent
9b089e7c04
commit
271721bbc0
11 changed files with 18396 additions and 111 deletions
18
README.md
18
README.md
|
|
@ -51,7 +51,7 @@ This application is using [React](https://reactjs.org/) for the frontend, [Netli
|
|||
In your terminal run the following command:
|
||||
|
||||
```bash
|
||||
export FAUNADB_SECRET=YourFaunaDBKeyHere
|
||||
export FAUNADB_SERVER_SECRET=YourFaunaDBKeyHere
|
||||
```
|
||||
|
||||
5. Run project locally
|
||||
|
|
@ -140,9 +140,9 @@ Head over to [https://app.fauna.com/sign-up](https://app.fauna.com/sign-up) to c
|
|||
|
||||
```bash
|
||||
# on mac
|
||||
export FAUNADB_SECRET=YourFaunaDBKeyHere
|
||||
export FAUNADB_SERVER_SECRET=YourFaunaDBKeyHere
|
||||
# on windows
|
||||
set FAUNADB_SECRET=YourFaunaDBKeyHere
|
||||
set FAUNADB_SERVER_SECRET=YourFaunaDBKeyHere
|
||||
```
|
||||
|
||||
Add the [/scripts/bootstrap-fauna-database.js](https://github.com/netlify/netlify-faunadb-example/blob/f965df497f0de507c2dfdb1a8a32a81bbd939314/scripts/bootstrap-fauna-database.js) to the root directory of the project. This is an idempotent script that you can run 1 million times and have the same result (one todos database)
|
||||
|
|
@ -324,7 +324,7 @@ Lets rock and roll.
|
|||
/* configure faunaDB Client with our secret */
|
||||
const q = faunadb.query
|
||||
const client = new faunadb.Client({
|
||||
secret: process.env.FAUNADB_SECRET
|
||||
secret: process.env.FAUNADB_SERVER_SECRET
|
||||
})
|
||||
|
||||
/* export our lambda function as named "handler" export */
|
||||
|
|
@ -410,7 +410,7 @@ So far we have created our `todo-create` function done and we've seen how we mak
|
|||
|
||||
const q = faunadb.query
|
||||
const client = new faunadb.Client({
|
||||
secret: process.env.FAUNADB_SECRET
|
||||
secret: process.env.FAUNADB_SERVER_SECRET
|
||||
})
|
||||
|
||||
exports.handler = (event, context, callback) => {
|
||||
|
|
@ -446,7 +446,7 @@ So far we have created our `todo-create` function done and we've seen how we mak
|
|||
|
||||
const q = faunadb.query
|
||||
const client = new faunadb.Client({
|
||||
secret: process.env.FAUNADB_SECRET
|
||||
secret: process.env.FAUNADB_SERVER_SECRET
|
||||
})
|
||||
|
||||
exports.handler = (event, context, callback) => {
|
||||
|
|
@ -491,7 +491,7 @@ So far we have created our `todo-create` function done and we've seen how we mak
|
|||
|
||||
const q = faunadb.query
|
||||
const client = new faunadb.Client({
|
||||
secret: process.env.FAUNADB_SECRET
|
||||
secret: process.env.FAUNADB_SERVER_SECRET
|
||||
})
|
||||
|
||||
exports.handler = (event, context, callback) => {
|
||||
|
|
@ -530,7 +530,7 @@ So far we have created our `todo-create` function done and we've seen how we mak
|
|||
|
||||
const q = faunadb.query
|
||||
const client = new faunadb.Client({
|
||||
secret: process.env.FAUNADB_SECRET
|
||||
secret: process.env.FAUNADB_SERVER_SECRET
|
||||
})
|
||||
|
||||
exports.handler = (event, context, callback) => {
|
||||
|
|
@ -569,7 +569,7 @@ So far we have created our `todo-create` function done and we've seen how we mak
|
|||
|
||||
const q = faunadb.query
|
||||
const client = new faunadb.Client({
|
||||
secret: process.env.FAUNADB_SECRET
|
||||
secret: process.env.FAUNADB_SERVER_SECRET
|
||||
})
|
||||
|
||||
exports.handler = (event, context, callback) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue