Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert express example to use vite #2226

Merged
merged 2 commits into from
Jun 11, 2024
Merged

convert express example to use vite #2226

merged 2 commits into from
Jun 11, 2024

Conversation

michenly
Copy link
Contributor

@michenly michenly commented Jun 7, 2024

@michenly michenly requested a review from frandiox June 7, 2024 19:36
@michenly michenly self-assigned this Jun 7, 2024
Copy link
Contributor

shopify bot commented Jun 7, 2024

Oxygen deployed a preview of your mc-express-example branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment June 11, 202411:57 AM
vite ✅ Successful (Logs) Preview deployment Inspect deployment June 11, 202411:57 AM
subscriptions ✅ Successful (Logs) Preview deployment Inspect deployment June 11, 202411:57 AM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment June 11, 202411:57 AM
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment June 11, 202411:57 AM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment June 11, 202411:57 AM

Learn more about Hydrogen's GitHub integration.

Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Requesting a few changing below.

Also, I noticed the following is not correct in Express:

requestGroupId: req.get('request-id'),
buyerIp: req.get('oxygen-buyer-ip'),

We should be using a random ID for the requestGroupId (generated in this file per request) and getting the user IP from the Express req object (something like req.headers['x-forwarded-for'] || req.socket.remoteAddress ).

examples/express/server.mjs Outdated Show resolved Hide resolved
examples/express/server.mjs Outdated Show resolved Hide resolved
examples/express/server.mjs Outdated Show resolved Hide resolved
@michenly michenly merged commit 17f9b87 into main Jun 11, 2024
12 checks passed
@michenly michenly deleted the mc-express-example branch June 11, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants