question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Seperate endpoints just for SSR mode.

See original GitHub issue

What is the motivation for adding / enhancing this feature?

When using VSF with docker network_mode: host is not supported for Docker for Desktop(Mac). Thus the categories and products cannot be fetched using SSR.

What are the acceptance criteria

  • Endpoints in default/local.json including something like “elasticsearch.host_ssr”

Can you complete this feature request by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a normal feature request. This should be available on https://test.storefrontcloud.io and then after tests this can be added to next Vue Storefront version. In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • (Pick this option only if you’re sure) This is an important improvement request for current Release Candidate version on https://next.storefrontcloud.io and should be placed in next RC version. In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • (Pick this option only if you’re sure) This is a critical improvement request for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version. In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Additional information

Screenshot 2019-05-06 at 13 10 23

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
pkarwcommented, Sep 3, 2019

All the endpoints should be just provided with _ssr option.

example:

    "api": {
      "url": "http://publicdomain.com:80",
      "url_ssr":  "http://privateaddress:8080",
    },
"cart": {
 "create_endpoint": "/api/cart/create?token={{token}}",
 "create_endpoint_ssr": "/api/cart/create?token={{token}}",
      "updateitem_endpoint": "/api/cart/update?token={{token}}&cartId={{cartId}}",
      "updateitem_endpoint_ssr": "/api/cart/update?token={{token}}&cartId={{cartId}}",
      "deleteitem_endpoint": "/api/cart/delete?token={{token}}&cartId={{cartId}}",
      "deleteitem_endpoint_ssr": "/api/cart/delete?token={{token}}&cartId={{cartId}}"
}

Please make sure the following areas are updated:

  • vue-storefront-api project,
  • core/scripts/installer.js
  • quickSearchByQuery - basically the search adapters in the vue-storefront,
  • sync/task.ts

Then double-check if all the endpoints specified in the config were supported:

redis.host
graphql.host
api.url
elasticsearch.host
storeViews.elasticsearch.host
cart.create_endpoint
cart.updateitem_endpoint
cart.deleteitem_endpoint
cart.pull_endpoint
cart.totals_endpoint
cart.paymentmethods_endpoint
cart.shippingmethods_endpoint
cart.shippinginfo_endpoint
cart.collecttotals_endpoint
cart.deletecoupon_endpoint
cart.applycoupon_endpoint
products.endpoint
orders.endpoint
reviews.create_endpoint
users.endpoint
users.history_endpoint
users.resetPassword_endpoint
users.changePassword_endpoint
users.login_endpoint
users.create_endpoint
users.me_endpoint
users.refresh_endpoint
stock.endpoint
mailer.endpoint.send
mailer.endpoint.token
1reaction
pkarwcommented, Oct 7, 2019

@andrzejewsky we’ve just got another user inquiry regarding this issue Today (Slack) and I belive we should take care of it in the next feature release

Read more comments on GitHub >

github_iconTop Results From Across the Web

Seperate endpoints just for SSR mode. · Issue #2861 - GitHub
When using VSF with docker network_mode: host is not supported for Docker for Desktop(Mac). Thus the categories and products cannot be fetched ...
Read more >
Server-side rendering - Apollo GraphQL Docs
Server-side rendering (SSR) is a performance optimization for modern web apps. It enables you to render your app's initial state to raw HTML...
Read more >
Server-side Rendering - Astro Documentation
In SSR mode, Astro uses HTML streaming to send each component to the browser as it renders them. This makes sure the user...
Read more >
Server-Side Rendering (SSR) - Vue.js
If we mutate the shared singleton state with data specific to one user, it can be accidentally leaked to a request from another...
Read more >
A beginner's guide to React Server-Side Rendering (SSR)
In this lesson, we are going to talk about server-side rendering (SSR), its benefits, and its pitfalls. Then we will set up a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found