#Valma
1 messages · Page 1 of 1 (latest)
Hi there!
If your code is working locally, the next steps are:
- Upload your backend code and your frontend code to your server
- And switch you test API keys (both frontend and backend) into live API keys. You can fint your keys in the Stripe dashboard here: https://dashboard.stripe.com/apikeys
ALright but shouldn't I make some changes to my code, like for exemple should I replace localhost:5500 to my domain name for exemple ?
Where are you using localhost:5500 in your code?
I see fetch("http://localhost:3000/create-checkout-session" in your code. So for sure you'll need to change the URL when your website is live since the URL will be different
Which url do I need to change ?
And knowing that my site is https://roomvibe.store/, do I write https://roomvibe.store:3000/create-checkout-session or https://roomvibe.store/create-checkout-session without the 3000 ?
It should be the URL of your backend URL. So probably just /create-checkout-session.
I recommend doing some tests, and if it doesn't work look at the error message to debug this.
Ok, but the thing is that right now I have to manually start the server with the command nodemon server.js wich start it at the port 3000 as you can see in the previous github code I shared earlier. That shouldn't be the case in the live website. What should I change ?
it depends a lot since it really changes depending on how your site is built and how you host it
what server are you using to host your website?
have you ever deployed a web app in general before?
I'm hosting my website on hostinger
In the file manager, there's the public_html folder and then there's all the html,css,js files
do you have a VPS with them? (to let you run an app and execute code on a server), or just static hosting?
you could start with https://support.hostinger.com/en/articles/1583661-is-node-js-supported-at-hostinger
ultimately you need a VPS or other similar system so you can run an actual Node instance on a server somewhere online to deploy this, since you need to have a Node server running and executing code, not just static hosting of HTML assets
not sure
note that if you don't want to/don't have experience developing/deploying a web app like this, you could just embed a PaymentLink (https://stripe.com/docs/no-code/payment-links) on your static site to get started taking some payments, doesn't require any Node backend
Hi! I'm taking over my colleague. Please, let me know if you have any other questions.