Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Commit

Permalink
chore: README changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ctjlewis committed Jan 24, 2021
1 parent ef53022 commit ec1123a
Showing 1 changed file with 51 additions and 59 deletions.
110 changes: 51 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,70 +37,62 @@ Click the [Deploy to Netlify Button](https://app.netlify.com/start/deploy?reposi

## Setup & Run Locally

1. Clone down the repository

```bash
git clone https://github.com/netlify/netlify-faunadb-example.git
```

2. Enter the repo directory

```bash
cd netlify-faunadb-example
```

3. Install the dependencies

```bash
npm install
```

4. Sign up for a FaunaDB account

https://dashboard.fauna.com/accounts/register

5. Create a database

In the Fauna Cloud Console:
- Click “New Database”
- Enter “Netlify” as the “Database Name”
- Click “Save”

6. Create a database access key

In the Fauna Cloud Console:
- Click “Security” in the left navigation
- Click “New Key”
- Make sure that the “Database” field is set to “Netlify”
- Make sure that the “Role” field is set to “Admin”
- Enter “Netlify” as the “Key Name”
- Click “Save”

7. Copy the database access key’s secret

Save the secret somewhere safe; you won’t get a second chance to see it.

8. Set your database access secret in your terminal environment

In your terminal, run the following command:

```bash
export FAUNADB_SERVER_SECRET=YourFaunaDBSecretHere
```
### 1. Clone down the repository
```bash
git clone https://github.com/netlify/netlify-faunadb-example.git
```

Replace `YourFaunaDBSecretHere` with the value of the secret that you copied in the previous step.
### 2. Enter the repo directory
```bash
cd netlify-faunadb-example
```

9. Bootstrap your FaunaDB collection and indexes
### 3. Install NPM dependencies
```bash
npm install
```

```bash
npm run bootstrap
```
### 4. Sign up for a FaunaDB account
https://dashboard.fauna.com/accounts/register

### 5. Create a database
In the Fauna Cloud Console:
- Click “New Database”
- Enter “Netlify” as the “Database Name”
- Click “Save”

### 6. Create a database access key
In the Fauna Cloud Console:
- Click “Security” in the left navigation
- Click “New Key”
- Make sure that the “Database” field is set to “Netlify”
- Make sure that the “Role” field is set to “Admin”
- Enter “Netlify” as the “Key Name”
- Click “Save”

### 7. Configure database access
Copy the secret key. **You won't get to see it again!**

Create a `.env` file in the top level of the repo. You can store your Fauna
server key here as an environment variable and `netlify dev` will load it
automatically:

```bash
# .env
FAUNADB_SERVER_SECRET="SECRET_KEY_HERE"
```

10. Start developing!
### 8. Bootstrap your FaunaDB collection and indexes
```bash
# create, import Fauna database schema
npm run bootstrap
```

```bash
netlify dev
```
### 9. Start developing!
```bash
# automatically loads variables from your local .env file
netlify dev
```

## TLDR; Quick Deploy

Expand Down

0 comments on commit ec1123a

Please sign in to comment.