Local Tunnel Help

2 replies
jdnovak
4 postsedited

I was going through the local tunnel procedure in episode 5. I was able to create a hard link ln /usr/bin/nodejs /usr/bin/node.

I type in 'node' and I receive > Nothing appears after the >.

Listening to the video I think Bernie had typed or hit a key. Other things I have tried was lt --port 80 but I receive -bash: lt: command not found. Maybe I have the wrong command for bash?

I did forward my ports but I would rather use local tunnel. Could this be an issue?

This is my 2nd run through the freedom cast, I did continue to install despite not receiving the same results as Bernie and did not receive the URL for local tunnel after I install node package manager and local tunnel on the 1st run.

I am thinking I will remove port forwarding and try again for the node.

Is anyone able to clarify this for me or spot what I am doing wrong?

MarioStaff
35 posts

With the 'node' command, you enter the node REPL which gives you the '>' prompt.  I believe he hit CTRL+D to exit the node REPL.  You can also hit CTRL+C twice.

Regarding the 'lt' command not found.. After installing npm (node package manager)

apt-get install npm

Then you use npm to install localtunnel with the '-g' option, this makes 'lt'  globally accessable on that OS.
Did you include '-g'?

npm install -g localtunnel

MarioStaff
35 posts

One other tip:  The reason for installing 'tmux' is because localtunnel does not give you the bash prompt back until you stop the localtunnel.

So, run the command 'tmux' before you run the command to start localtunnel

tmux
lt --port 80

Now you can detach from the tmux session by hitting CTRL+b then 'd' and reattach later with the command 'tmux attach' allowing you to work at the cli while the localtunnel is running.

To stop the localtunnel hit CTRL+c then 'exit' to exit the tmux session.

Log in to reply. New here? It takes a minute.