Page MenuHomeDevCentral

Adopt local tunnel
ClosedPublic

Authored by MoustaphaAs on Wed, Nov 27, 17:27.
Tags
None
Referenced Files
F3923087: D3600.id9315.diff
Sat, Dec 21, 05:58
F3923075: D3600.id9314.diff
Sat, Dec 21, 05:55
F3923072: D3600.id9316.diff
Sat, Dec 21, 05:53
F3923068: D3600.id9313.diff
Sat, Dec 21, 05:52
F3923020: D3600.id9308.diff
Sat, Dec 21, 05:35
Unknown Object (File)
Mon, Dec 16, 00:20
Unknown Object (File)
Sun, Dec 15, 07:16
Unknown Object (File)
Thu, Dec 12, 08:21
Subscribers
None

Details

Summary

Create a tunnel from the local development server
(running on config.dev.port) to a publicly accessible URL.

Diff Detail

Repository
rUPSECTION Upsection
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

MoustaphaAs created this revision.
MoustaphaAs retitled this revision from Adopt local tunnel and reorder imports to Adopt local tunnel.Wed, Nov 27, 18:03
components/gulpfile.js
17–18

If you require it at line 23, you probably don't need import here.

dereckson requested changes to this revision.Wed, Nov 27, 21:03
dereckson added inline comments.
components/gulpfile.js
188

Why move the location of the server() function?

That breaks the Git history.

194

No need to define it if it's false

198

(1) We can put the new code in a setupTunnel() function.

See https://jeroendedauw.github.io/slides/craftmanship/functions/#/1 to understand the logic to use short clean functions.

(2) In the localtunnel configuration, we should also take the value of tunnel setting to allow the subdomain.

(3) We should ensure the code also works when tunnel IS NOT defined in config.yml (no tunnel in that case)

(4) The done method should be called AFTER everything is called, including the tunnel, so instead of passing it to browser.init, we can call it afterwards

We would then have something like:

browser.init(...);

if (config.dev.tunnel) {
    setupTunnel()
}

done()
This revision now requires changes to proceed.Wed, Nov 27, 21:03
MoustaphaAs marked an inline comment as done.

setupTunnel() function defined, allowing the use of a subdomain and code working when the tunnel is not defined

MoustaphaAs marked 2 inline comments as done.

Verify the existence of the subdomain; if not, generate a random one.

Verify the existence of tunnel attributs

MoustaphaAs marked an inline comment as done.

Revision

This revision is now accepted and ready to land.Thu, Nov 28, 10:49
This revision was automatically updated to reflect the committed changes.