Egendata CLI
A simple CLI for running and developing against the egendata stack
Prerequisites
In order to run the cli, you need to install node.js and docker-compose.


Install and run or just run
You can either install the cli as a global package and use the command egendata
npm install -g @egendata/cli
egendata --help
...or run it immediately via npx
npx @egendata/cli --help
All the examples assume the cli is installed. If you choose not to install the
cli globally, just replace egendata with npx @egendata/cli.
Tunneling a local service
Command: egendata tunnel [flags] [start command]
This will use localtunnel.me to expose your service on the interwebs
egendata tunnel --port=4000 --subdomain=fooservice npm start
This will open a tunnel on https://fooservice.localtunnel.me pointing to
http://localhost:4000. It will also call:
NODE_ENV=development CLIENT_ID=https://fooservice.localtunnel.me OPERATOR_URL=https://operator-test.dev.services.jtech.se/api PORT=4000 npm start
The Operator URL is that of the test Operator which can be used with the test build of the Egendata app.
Unsafe tunneling
...is of course not recommended but it is possible. Just add the --unsafe flag.
Running Egendata infrastructure locally
Commands:
Flags
-
--no-log â No logging infrastructure
-
--no-operator â No Operator started - only Operator DB
-
--example â Starts the CV example site on http://[your-ip]:4000
-
--attach â Runs the containers attached to the terminal