Skip to content
This repository was archived by the owner on Jul 19, 2021. It is now read-only.

External Link Not Visible Outside of Network #759

Closed
callaginn opened this issue Sep 17, 2018 · 5 comments
Closed

External Link Not Visible Outside of Network #759

callaginn opened this issue Sep 17, 2018 · 5 comments

Comments

@callaginn
Copy link

callaginn commented Sep 17, 2018

Problem

The "external link" provided by Slate Tools does NOT work externally. That is, it ONLY works within my local network.

screen shot 2018-09-17 at 12 50 37 pm

Replication steps

  • Start Slate using yarn start
  • Viewing the site with the external link (https://10.0.1.2:3000) works. However, viewing that link outside of the network either shows a blank page or "site can't be reached" error page. This means clients can't view the progress of our site during development.

More Information

  • macOS High Sierra 10.13.4
  • Using Slate v1.0.0-beta.7
  • Chrome 68.0.3440.106 (Official Build) (64-bit)

I should also mention that both the internal and external BrowserSync control panel doesn't work correctly, no matter what computer it's viewed at inside our network. Plugin loads, but no content is visible:
screen shot 2018-09-17 at 1 02 27 pm

Gives me a bunch of console errors instead:
screen shot 2018-09-17 at 1 06 48 pm

Solution?

All that being said, is there a way to view sites that are being actively developed with Slate outside of our network?

@JPrisk
Copy link

JPrisk commented Sep 17, 2018

The most common solution to this problem is to have two themes setup on your Shopify site. One for production and one for development. You can publish and deploy your code to the production theme and continue working on the development theme using preview. Having this setup alows you to provide a client with the mystore.myshopify.com URL to review

@callaginn
Copy link
Author

callaginn commented Sep 18, 2018

@JPrisk Ok, that kinda makes sense. So would a workflow like this work?

Setup

  • Keep my current development theme id in .env
  • Duplicate my current theme within Shopify as "production" and add the new theme id to .env.production
  • Add an --env=production flag to the package.json "scripts.deploy" section:
"scripts": {
    "start": "slate-tools start",
    "watch": "slate-tools start --skipFirstDeploy",
    "build": "slate-tools build",
    "deploy": "slate-tools build && slate-tools deploy --env=production",
    "zip": "slate-tools build && slate-tools zip",
    "lint": "slate-tools lint",
    "format": "slate-tools format"
}

Local Development

Since Slate defaults to .env, only my "development" theme would change when I run yarn start, yarn watch, etc? And since I'm developing locally, I don't see any reason to "deploy" to my dev theme. This would be accessible via Slate's localhost:3000 link.

Production / Proofing

Due to my changes above, running yarn deploy would rebuild my site and push it to the production theme? Since this would be accessible via the public mystore.myshopify.com link, I could share daily snapshots with clients.

@dan-gamble
Copy link
Contributor

That's pretty much the exact same workflow i use @callaginn. This way you can work on a site without affecting the live theme at all.

@t-kelly
Copy link
Contributor

t-kelly commented Sep 18, 2018

@callaginn if you realllly want, you can use a service like https://forwardhq.com/. Though I might need to ship #757 before thats possible again.. Haven't tested it.

@t-kelly t-kelly closed this as completed Sep 18, 2018
@lock
Copy link

lock bot commented Oct 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants