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
* Removed optional dependencies from `package.json`, as the setup would remove optional dependencies when installing new packages without use of `--include=optional`...
6
+
* Changed use of `NGROK_URL` -> `BASE_URL`.
7
+
* Renamed `NGROK_AUTH` -> `NGROK_TOKEN` to avoid confusion with the `ngrok.js` config option `auth`.
Optional dependencies are not automatically installed in this repo. You must either manually install them with `npm i`, or you can install all optional dependencies: `npm i --include=optional`.
78
-
79
-
There are currently 2 optional dependencies in this repo: [`ngrok`](#working-with-ngrok) and [`sails-hook-autoreload`](#support-for-sails-hook-autoreload).
80
-
81
74
See the [`package.json` for more details](package.json).
82
75
83
76
## How to Use
@@ -282,7 +275,7 @@ and [`config/env/production.js`](config/env/production.js)
282
275
|`DB_PORT`| 3306 | The port number for the datastore. |
283
276
|`DB_SSL`| true | If the datastore requires SSL, set this to "true". |
284
277
|`SESSION_SECRET`| "" (empty string) | Used to sign cookies, and SHOULD be set, especially on PRODUCTION environments. |
285
-
|`NGROK_AUTH`| "" (empty string) | Ngrok auth token used in the [`ngrok.js`](#working-with-ngrok) script. |
278
+
|`NGROK_TOKEN`| "" (empty string) | Ngrok auth token used in the [`ngrok.js`](#working-with-ngrok) script. |
@@ -368,26 +361,29 @@ This repo has a custom script ([`ngrok.js`](ngrok.js)), which will start an Ngro
368
361
369
362
You will want to get an auth token (and create an account if you haven't already): https://dashboard.ngrok.com/tunnels/authtokens
370
363
371
-
You will need to `npm i ngrok --save-dev`(or install optional dependencies) before you can do anything. I've opted to not have it pre-installed, as it does add a bit of bloat, and not everyone is going to use it.
364
+
You will need to `npm i ngrok --save-dev` before you can do anything. I've opted to not have it pre-installed, as it does add a bit of bloat, and not everyone is going to use it.
372
365
373
-
After you have it installed, you can run `ngrok.js`, like this: `node ngrok`.
366
+
After you have it installed, you can run `ngrok.js`, with node: `node ngrok` or just directly: `./ngrok.js`.
374
367
375
368
### Script Options
376
369
377
-
These are the current configuration flags. Order does not matter. There will likely be more in the future.
370
+
These are the current configuration flags. Order does not matter.
|`nobuild`| Adding this flag will disable asset building. |
382
-
|`auth=TOKEN`| Adding this flag (replacing TOKEN with your actual token) will set your Ngrok auth token. In most cases, ngrok will automatically save this token in your home folder, and re-use it later. You can test this out by omitting your token on next run, and go to your [Ngrok dashboard](https://dashboard.ngrok.com/tunnels/agents). |
|`auth=USER:PASS`| This will protect the Ngrok tunnel with HTTP Basic Auth, using the USER / PASS you supply. |
375
+
|`nobuild`| Adding this flag will disable asset building. |
376
+
|`domain=MYDOMAIN`| The domain to connect the tunnel from Sails to. |
377
+
|`region=MYREGION`| The region to use for connection to the Ngrok services. One of Ngrok regions (`us`, `eu`, `au`, `ap`, `sa`, `jp`, `in`). Defaults to `us`. |
378
+
|`token=MY_AUTH_TOKEN`| Adding this flag will set your Ngrok auth token. In most cases, ngrok will automatically save this token in your home folder, and re-use it later. You can test this out by omitting your token on next run, and go to your [Ngrok dashboard](https://dashboard.ngrok.com/tunnels/agents). |
383
379
384
-
You can also use the environment variable `NGROK_AUTH` to pass your auth token.
380
+
You can also use the environment variable `NGROK_TOKEN` to pass your auth token. If both environment variable, and script flag are set, the script flag will take priority.
385
381
386
-
Full example: `node ngrok nobuild auth=S1T2A3Y4I5N6G7A8L9I0V1E`
382
+
An example: `node ngrok nobuild token=S1T2A3Y4I5N6G7A8L9I0V1E region=us`
387
383
388
384
## Support for `sails-hook-autoreload`
389
385
390
-
If you would like to use [`sails-hook-autoreload`](https://npmjs.com/package/sails-hook-autoreload), just install it: `npm i sails-hook-autoreload --save-dev` (or install optional dependencies). The config file [`config/autoreload.js`](config/autoreload.js) is already pre-configured for this repo.
386
+
If you would like to use [`sails-hook-autoreload`](https://npmjs.com/package/sails-hook-autoreload), just install it: `npm i sails-hook-autoreload --save-dev`. The config file [`config/autoreload.js`](config/autoreload.js) is already pre-configured for this repo.
0 commit comments