#user1352-
1 messages · Page 1 of 1 (latest)
The problem is the server.js been running in localhost after I add it to my website
The url for my website did work because the localhost for the server
This is my issue
I using node js
Hi
There is ((main url , and the localhost)) the localhost stoped the main url for the website.
How it fix
I'm sorry, I'm not following.
There is ((main url , and the localhost)) the localhost stoped the main url for the website.
I have website I add the card.html to it
The server only run in localhost
How to fix this
Hey there
Let's chat here
What are you exactly trying to do?
There is ((main url , and the localhost)) the localhost stoped the main url for the website.
The server only run in localhost
This card of stripe payment I add to my website, and it required the server to be running the issue is the stripe only run in localhost not my website url
You can access the file here in this link
This the server who only run in localhost4242
are you seeing any errors in the console of your browser?
The server.js when I running it to go to the localhost directly
This make my url of website shot down
Can I make the server.js run with my website to fix the issue
?
The server.js an the card.html with link I sent up
Can I make the server.js run with my website to fix the issue
yiy cab try ut iyt
app.listen(4242, () => console.log(Node server listening at http://localhost:4242`)
);
`
Hi
The local host stoped my website url
So what do you thank
I'm still not sure about your issue
can you share your main URL?
It test publish website
Go the checkout in drop menu
I will see the card.html
It need to access the server.js
The server.js only run in localhost as I told you
You'd probably wanna make sure the file's been uploaded correctly
Unfortunately, that is something we can't help with as it isn't really a Stripe API issue.
What file
Can I access the server.js from crad.html
?
app.listen(4242, () => console.log(Node server listening at http://localhost:4242`)
);
`
What inside the server.js it running in 4242
Even if I adding it
How I make it running with website
?
We don't know how deploying code would work for whatever environment you're using, but you need to ensure you start the server suitably, including an appropriate port compatible with your host
You may want to see if your hosting provider offers examples for hosting node apps and using those as a reference
The sample code Stripe provides is meant to be illustrative, it is not intended to be run verbatim in a production environment
Glitch has many examples you can follow for hosting node, did you start from one of those?
Yes I as you said it has
I have checked another app host it has server.js and it running with website without any error
So what exactly is the issue you're having, then?
If another example has no error, what error are you encountering?
This is for stripe card.html
Hi synthrider
Look to this two server in this link
The server1.js don’t shot down website
Are you finding any error in your server logs?
We can't really help you with general deployment issues, though if you can be really specific about the trouble you're facing we might have some pointers.
You need to check for errors in your server logs though, or share exactly what is not working like you expect. If it's related to the Stripe SDK usage, we can help you figure that out 🙂