https://github.com/lightsofapollo/ngrok-services
Hacks for ngrok to use it in an automated fashion for testing/development/etc...
https://github.com/lightsofapollo/ngrok-services
Last synced: 12 months ago
JSON representation
Hacks for ngrok to use it in an automated fashion for testing/development/etc...
- Host: GitHub
- URL: https://github.com/lightsofapollo/ngrok-services
- Owner: lightsofapollo
- Created: 2014-01-30T07:50:19.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-31T19:03:16.000Z (over 12 years ago)
- Last Synced: 2024-12-27T15:12:44.336Z (over 1 year ago)
- Language: JavaScript
- Size: 6.37 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ngrok-services
[](https://travis-ci.org/lightsofapollo/ngrok-services)
Node based wrapper for ngrok... Ideally this would be baked into ngrok
(or as a go client) but as an inital PoC I wrote this by wrapping ngrok.
## Features
- machine readable (json) output
- multiple (machine readable) output formats from start/restart (json/env file)
## Usage
### CLI
```sh
ngrok-services --help
```
```
Usage: ngrok-services [options] [command]
Commands:
stop [config] terminate ngrok tunneling
start [config] start running ngrok with the config
restart [config] ensure the service is running by stopping/starting
Options:
-h, --help output usage information
-p, --pid-file pid file location
-f, --format name of formatter [env|json]
```
### Config Files
create a `ngrok_services.json` (can also be a js file) like this:
``` json
{
"http": { "port": 8080 },
"amqp": { "port": 5701, "proto": "tcp", "authtoken": "..." },
}
```
Then it can be manipulated via `ngrok-services`:
## Examples
```sh
# usage is global ngrok-services might be at ./node_modules/.bin/ngrok-services
ngrok-services start
ngrok-services stop
ngrok-services restart
```
```sh
# can also be used with paths
ngrok-services start some_folder
ngrok-services stop some_folder
ngrok-services restart some_folder
```
```sh
# output formats
ngrok-services start -f env
ngrok-services start -f json
ngrok-services start -f ./path/to/custom/thing
```