Skip to content

Instantly share code, notes, and snippets.

@leafac
Created May 9, 2024 15:04
Show Gist options
  • Save leafac/30424122f72669a591f4c2a967202b85 to your computer and use it in GitHub Desktop.
Save leafac/30424122f72669a591f4c2a967202b85 to your computer and use it in GitHub Desktop.
  1. Create the tunnel. If you’re part of the Courselore team, you may request a custom Courselore tunnel address such as leafac.courselore.org, otherwise you may use services such as Localtunnel and localhost.run, for example:

    # Custom Courselore Tunnel Address
    $ ssh -NR 3000:localhost:80 root@leafac.courselore.org
    
    # Localtunnel
    $ npx localtunnel --port 80
    
    # localhost.run
    $ ssh -R 80:localhost:80 localhost.run
  2. Run Courselore with the TUNNEL environment variable set to the address given in step 1, for example, in macOS and Linux:

    # Custom Courselore Tunnel Address
    $ env TUNNEL=leafac.courselore.org npm run start
    
    # Localtunnel
    $ env TUNNEL=tough-feet-train-94-60-46-156.loca.lt npm run start
    
    # localhost.run
    $ env TUNNEL=089678d384a43b.lhr.life npm run start
  3. Visit the address on the other device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment