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

Commit ec1123a

Browse files
committed
chore: README changes
1 parent ef53022 commit ec1123a

File tree

1 file changed

+51
-59
lines changed

1 file changed

+51
-59
lines changed

README.md

Lines changed: 51 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -37,70 +37,62 @@ Click the [Deploy to Netlify Button](https://app.netlify.com/start/deploy?reposi
3737

3838
## Setup & Run Locally
3939

40-
1. Clone down the repository
41-
42-
```bash
43-
git clone https://github.com/netlify/netlify-faunadb-example.git
44-
```
45-
46-
2. Enter the repo directory
47-
48-
```bash
49-
cd netlify-faunadb-example
50-
```
51-
52-
3. Install the dependencies
53-
54-
```bash
55-
npm install
56-
```
57-
58-
4. Sign up for a FaunaDB account
59-
60-
https://dashboard.fauna.com/accounts/register
61-
62-
5. Create a database
63-
64-
In the Fauna Cloud Console:
65-
- Click “New Database”
66-
- Enter “Netlify” as the “Database Name”
67-
- Click “Save”
68-
69-
6. Create a database access key
70-
71-
In the Fauna Cloud Console:
72-
- Click “Security” in the left navigation
73-
- Click “New Key”
74-
- Make sure that the “Database” field is set to “Netlify”
75-
- Make sure that the “Role” field is set to “Admin”
76-
- Enter “Netlify” as the “Key Name”
77-
- Click “Save”
78-
79-
7. Copy the database access key’s secret
80-
81-
Save the secret somewhere safe; you won’t get a second chance to see it.
82-
83-
8. Set your database access secret in your terminal environment
84-
85-
In your terminal, run the following command:
86-
87-
```bash
88-
export FAUNADB_SERVER_SECRET=YourFaunaDBSecretHere
89-
```
40+
### 1. Clone down the repository
41+
```bash
42+
git clone https://github.com/netlify/netlify-faunadb-example.git
43+
```
9044

91-
Replace `YourFaunaDBSecretHere` with the value of the secret that you copied in the previous step.
45+
### 2. Enter the repo directory
46+
```bash
47+
cd netlify-faunadb-example
48+
```
9249

93-
9. Bootstrap your FaunaDB collection and indexes
50+
### 3. Install NPM dependencies
51+
```bash
52+
npm install
53+
```
9454

95-
```bash
96-
npm run bootstrap
97-
```
55+
### 4. Sign up for a FaunaDB account
56+
https://dashboard.fauna.com/accounts/register
57+
58+
### 5. Create a database
59+
In the Fauna Cloud Console:
60+
- Click “New Database”
61+
- Enter “Netlify” as the “Database Name”
62+
- Click “Save”
63+
64+
### 6. Create a database access key
65+
In the Fauna Cloud Console:
66+
- Click “Security” in the left navigation
67+
- Click “New Key”
68+
- Make sure that the “Database” field is set to “Netlify”
69+
- Make sure that the “Role” field is set to “Admin”
70+
- Enter “Netlify” as the “Key Name”
71+
- Click “Save”
72+
73+
### 7. Configure database access
74+
Copy the secret key. **You won't get to see it again!**
75+
76+
Create a `.env` file in the top level of the repo. You can store your Fauna
77+
server key here as an environment variable and `netlify dev` will load it
78+
automatically:
79+
80+
```bash
81+
# .env
82+
FAUNADB_SERVER_SECRET="SECRET_KEY_HERE"
83+
```
9884

99-
10. Start developing!
85+
### 8. Bootstrap your FaunaDB collection and indexes
86+
```bash
87+
# create, import Fauna database schema
88+
npm run bootstrap
89+
```
10090

101-
```bash
102-
netlify dev
103-
```
91+
### 9. Start developing!
92+
```bash
93+
# automatically loads variables from your local .env file
94+
netlify dev
95+
```
10496

10597
## TLDR; Quick Deploy
10698

0 commit comments

Comments
 (0)