Trying to set up Shopify node app on server

Topic summary

A developer successfully built a Shopify Node.js app that works locally but encounters backend issues when deployed to an AWS EC2 server.

What’s Working:

  • Frontend build (created via npm run build) deploys successfully to the server’s HTML folder
  • Frontend is accessible and functional

Current Problems:

  • Backend APIs are not responding on the server
  • Shopify login/authentication fails on the deployed version
  • The app only functions with npm run dev (localhost URL), which doesn’t work for server deployment
  • Running npm run serve directly on the web folder also fails

Technical Context:

  • Node version: 18
  • CLI version: 3.50
  • An image was shared (likely showing configuration or error details)

The developer is seeking guidance on properly configuring the Node.js backend to run on AWS EC2 alongside the deployed frontend.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

I have created a shopify app with node template. It is working on my localhost but backend is not working on AWS server.

Steps: I created frontend build using npm run build. It created dist folder in frontend. Then I uploaded dist folder content in server html folder and updated urls in Shopify app. The Frontend worked, but the backend APIs are not working.

Issue:- On server, shopify login is not working as it creates localhost url on npm run dev and web folder is not working directly as well if I run npm run serve. So I am unable to find a way to make the node backend work on AWS ec2 server.

node version: 18

CLI version: 3.50