Nextjournal is a great way to experiment with building services in the cloud. Ngrok makes it easy to expose localhost servers to the internet.
Settings for the ngrok configuration file.
Grab your authtoken from ngrok. The token will authenticate this notebook with the ngrok service.
Store the token in your Nextjournal secret vault and add it to the environment.
Prepend the authtoken to the configuration file above,
ngrok in the background using nohup. Unfortunately, there are no plans to offer a daemon service in the basic ngrok package.
Place the URL into a browser and the tunnel will be visible. Anything served from port 5000 will appear here. In this case, there is nothing being served, hence the error message.
The service is up and running. To stop the ngrok tunnel, use the
kill command with the process ID:
kill <PID> or
kill -9 "$(pgrep ngrok)".