App Deployment

Highlighted
Tourist
8 0 6

Hi!

 

I've built a Shopify app with node/react following this very helpful tutorial: https://developers.shopify.com/tutorials/build-a-shopify-app-with-node-and-react/

 

It works fine using ngrok and localhost:3000.  I'm ready to deploy a first version of it (tried on firebase, now trying heroku) with the eventual goal of submitting it to Shopify's App Store, but am having some trouble, as I'm not super familiar with next.js, or deployment in general. 

 

Is there an accompanying or other relevant tutorial that would walk me through deploying my app to a cloud server?  Do i have to deploy my server.js and my view("/pages") separately?  Can I deploy them all at once?  Is there a way I should rearrange my files in order to make a production build?

 

Here's a link to my repo: 

https://github.com/dougpoole333/marquee3

 

A few notes: I've customized the server.js a bit (so I can can make put requests and add a marquee.liquid asset to the user's /sections folder), and I have a file called marquee-content.js (which just contains the string of liquid code I'm adding to a new user asset).

 

It's a pretty simple app - doesnt seem like it should be too crazy to deploy.  Any advice or guidance would be super helpful!  Thank you!

3 Likes
Highlighted
Shopify Staff
Shopify Staff
630 16 197

Hi there @Bismuth_doug 

 

Thanks for your question- great to hear you've found our app building guide helpful :) While we don't have any official documentation for deploying to third-party servers, there is a a step by step process for deploying to Heroku outlined in a recent GitHub issue. You might also find the Heroku deployment docs useful too. 

 

I hope this helps- let us know if you run into any other issues! 

 

Cheers,

 

Liam Griffin

Shopify | Developer Advocate 

 

Liam Griffin
Shopify | Developer Community Manager
5 Likes
Highlighted
New Member
2 0 2

Hi Bismuth, 

 

Deploying a node app to a cloud server is not directly related to shopify. 

A first step would be to choose your cloud server. After that try to look up how to deploy a node app to that server.

 

Best,

 

Maarten

 

2 Likes
Highlighted
New Member
2 0 2

Bismut,

 

Deployment of your app to Heroku is very simple. As you have your code on Git, it pretty easy to deploy from Git to Heroku

 

Ensure you have git and Heroku command line installed. From the root of your project, type heroku, which will prompt you for credentials and the project you want to deploy. This would also make entry into .git, which infact you can modify manually to point to different project on Heroku

 

Once you check-in changes to git you can issue the command to deploy to heroku

 

cmd: git push heroku

This command will take you latest code on git and deploy to Heroku. Also ensure on Heroku portal, you gave git permission to access for deployment

2 Likes