Skip to content
← Back to Community
Ip address issue
Profile icon
DhirajBaid

Hey just wanted to know that i use an nodejs api to retirive info so it needs an ip address when i add the ip address it works but when the repl restarts it doesnt work.

Any fixes? or any suggestions for me, thx in advance :)

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
DhirajBaid
Comments
hotnewtop
Profile icon
Coder100

Not on repl.it, you can't get any real IP addresses through repl.it due to their proxy protocol.

Profile icon
DhirajBaid

@Coder100
i can get it via node js terminal look at the screenshot >
image

Profile icon
Coder100

@DhirajBaid
but is it your IP address?

Profile icon
DhirajBaid

@Coder100
nah lol its repls ip address mine is way off this

Profile icon
Coder100

lol yeah, you should use some other hosting solution, or if there can be, a username/password authentication

@DhirajBaid

Profile icon
DhirajBaid

guess thats the answer :(

@Coder100

Profile icon
Coder100
Profile icon
DhirajBaid

@Coder100
lol i need help im a newbie, fyi its a discord bot

Profile icon
Coder2195

BRUH I TRACKED IP ALL OVER THE WORLD AND I USED VPN TO CONFIRM

Profile icon
RYANTADIPARTHI

It's probably not saving. Use a database to save the IP address

from replit import db

Use that to save

Profile icon
DhirajBaid

@RYANTADIPARTHI
Im not trying to save the ip im trying to make it not change im using express to host it on local host and it keeps changing (also im using nodejs)

Profile icon
RYANTADIPARTHI

@DhirajBaid
well, that's the point of an API. It changes. You can't do anything about it. Try getting an normal ip.

Profile icon
DhirajBaid

@RYANTADIPARTHI
im trying not mot make repls ip address change because since its on localhost it keeps changing

Profile icon
RYANTADIPARTHI

@DhirajBaid
well, i don't know if you can stop that. i don't think you can