Skip to content

Commit

Permalink
[DOCS-3450] Remove .fauna-project (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodewig authored Sep 27, 2024
1 parent a13f453 commit c2b9a07
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
6 changes: 0 additions & 6 deletions .fauna-project

This file was deleted.

35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).

## Setup

1. In your terminal, clone the repo and navigate to the `js-sample-app`
directory. For example:
1. Clone the repo and navigate to the `js-sample-app` directory:

```sh
git clone [email protected]:fauna/js-sample-app.git
Expand All @@ -105,6 +104,15 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).
fauna cloud-login
```

When prompted, enter:

* **Endpoint name:** `cloud` (Press Enter)
* **Email address:** The email address for your Fauna account.
* **Password:** The password for your Fauna account.
* **Which endpoint would you like to set as default?** The `cloud-*`
endpoint for your preferred region group. For example, to use the US
region group, use `cloud-us`.

The command requires an email and password login. If you log in to the Fauna
using GitHub or Netlify, you can enable email and password login using the
[Forgot Password](https://dashboard.fauna.com/forgot-password) workflow.
Expand All @@ -116,7 +124,22 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).
fauna create-database --environment='' ECommerce
```

4. Push the FSL files in the `schema` directory to the `ECommerce`
4. Create a
[`.fauna-project`](https://docs.fauna.com/fauna/current/tools/shell/#proj-config)
config file for the project:

```sh
fauna project init
```

When prompted, enter:

* `schema` as the schema directory.
* `dev` as the environment name.
* The default endpoint.
* `ECommerce` as the database.

5. Push the FSL files in the `schema` directory to the `ECommerce`
database:

```sh
Expand All @@ -127,7 +150,7 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).
and user-defined functions (UDFs) defined in the FSL files of the
`schema` directory.

5. Create a key with the `server` role for the `ECommerce` database:
6. Create a key with the `server` role for the `ECommerce` database:

```sh
fauna create-key --environment='' ECommerce server
Expand All @@ -136,13 +159,13 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).
Copy the returned `secret`. The app can use the key's secret to authenticate
requests to the database.
6. Make a copy of the `.env.example` file and name the copy `.env`. For example:
7. Make a copy of the `.env.example` file and name the copy `.env`. For example:
```sh
cp .env.example .env
```
7. In `.env`, set the `FAUNA_SECRET` environment variable to the secret you
8. In `.env`, set the `FAUNA_SECRET` environment variable to the secret you
copied earlier:
```
Expand Down

0 comments on commit c2b9a07

Please sign in to comment.