You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,12 @@ npm install
23
23
24
24
3. To expose your app server using an HTTP tunnel, install [ngrok](https://www.npmjs.com/package/ngrok#usage) globally, then start the ngrok service.
25
25
26
+
Starting a local HTTP tunnel with ngrok requires you to create an [ngrok account](https://dashboard.ngrok.com/signup) and add your [ngrok authtoken](https://dashboard.ngrok.com/get-started/your-authtoken) to the ngrok config file.
27
+
28
+
```shell
29
+
ngrok config add-authtoken $YOUR_AUTHTOKEN
30
+
```
31
+
26
32
You can use `npm` to install ngrok:
27
33
28
34
```shell
@@ -57,29 +63,29 @@ cp .env-sample .env
57
63
58
64
6. In the `.env` file, replace the `CLIENT_ID` and `CLIENT_SECRET` variables with the API account credentials in the app profile. To locate the credentials, find the app's profile in the [Developer Portal](https://devtools.bigcommerce.com/my/apps), then click **View Client ID**.
59
65
60
-
7. In the `.env` file, update the `AUTH_CALLBACK` variable with the `ngrok_url` from step 4.
66
+
7. In the `.env` file, update the `AUTH_CALLBACK` variable with the auth callback URL from step 4.
61
67
62
68
8. In the `.env` file, enter a secret `JWT_KEY`. To support HS256 encryption, the JWT key must be at least 32 random characters (256 bits).
63
69
64
-
9.**Configure the data store.**In the `.env` file, specify the `DB_TYPE`.
70
+
9.**Configure the data store.**This project was written to use [Firebase](https://firebase.google.com/) or [MySQL](https://www.mysql.com/)
65
71
66
-
> The DB type must be either `firebase` or `mysql`.
72
+
In the `.env` file, specify the `DB_TYPE`.
67
73
68
-
If using Firebase, supply the `FIRE_` config keys listed in the `.env` file. See the [Firebase quickstart (Google)](https://firebase.google.com/docs/firestore/quickstart).
74
+
If using Firebase, copy the contents of your Service Account JSON key file into the `sample-firebase-keys.json` file. This file can be generated by:
75
+
1. Creating a new project in Firebase
76
+
2. Adding a Cloud Firestore
77
+
3. And generating a new Private Key under Project Settings > Service Accounts
78
+
See the [Firebase quickstart (Google)](https://firebase.google.com/docs/firestore/quickstart) for more detailed information.
69
79
70
-
If using MySQL, supply the `MYSQL_` config keys listed in the `.env` file, then do the initial database migration by running the following npm script:
71
-
72
-
```shell
73
-
npm run db:setup
74
-
```
80
+
If using MySQL, supply the `MYSQL_` config keys listed in the `.env` file, then do the initial database migration by running the following npm script: `npm run db:setup`
75
81
76
82
10. Start your dev environment in a dedicated terminal session, **separate from `ngrok`**.
77
83
78
84
```shell
79
85
npm run dev
80
86
```
81
87
82
-
> If `ngrok` expires, update the callbacks in steps 4 and 7 with the new `ngrok_url`. You can learn more about [persisting ngrok tunnels longer (ngrok)](https://ngrok.com/docs/getting-started/#step-3-connect-your-agent-to-your-ngrok-account).
88
+
> If you relaunch `ngrok`, update the callbacks in steps 4 and 7 with the new `ngrok_url`. You can learn more about [persisting ngrok tunnels longer (ngrok)](https://ngrok.com/docs/getting-started/#step-3-connect-your-agent-to-your-ngrok-account).
83
89
84
90
11. Consult our developer documentation to [install and launch the app](https://developer.bigcommerce.com/api-docs/apps/quick-start#install-the-app).
0 commit comments