#user1352-

1 messages · Page 1 of 1 (latest)

idle bronze
#

Hi 👋 can you tell us a bit about your problem?

surreal arch
#

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

idle bronze
#

I'm sorry, I'm not following.

surreal arch
#

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

soft fossil
#

Hey there
Let's chat here
What are you exactly trying to do?

surreal arch
#

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

soft fossil
#

are you seeing any errors in the console of your browser?

surreal arch
#

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

soft fossil
#

Can I make the server.js run with my website to fix the issue
yiy cab try ut iyt

surreal arch
#

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

soft fossil
#

I'm still not sure about your issue
can you share your main URL?

surreal arch
#

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

soft fossil
#

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.

surreal arch
#

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

#

?

pearl kelp
#

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

surreal arch
#

This my

#

Host

#

Provide

pearl kelp
#

Glitch has many examples you can follow for hosting node, did you start from one of those?

surreal arch
#

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

pearl kelp
#

So what exactly is the issue you're having, then?

#

If another example has no error, what error are you encountering?

surreal arch
#

This is for stripe card.html

#

Hi synthrider

#

Look to this two server in this link

#

The server1.js don’t shot down website

pearl kelp
#

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 🙂