What is the url with which I can access my expess app (nodejs)

Multi tool use
I have deployed my Nodejs Express app on GoDaddy using ssh access to configure the whole thing. But I can't find the URL that leads me to my app.
it works perfectly on my computer where I access the app via the link http://localhost:3000
const express = require("express");
const bodyParser = require("body-parser");
const httpRequest = require("request");
const app = new express();
const http = require("http").Server(app);
const io = require("socket.io")(http);
app.set("view engine","ejs");
var port = process.env.PORT || 3000;
app.use(express.static("public"));
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json())
//headers
app.use(function (req, res, next) {
// Website you wish to allow to connect
res.setHeader('Access-Control-Allow-Origin', '*');
// Request methods you wish to allow
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT,
PATCH, DELETE');
// Request headers you wish to allow
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
// Set to true if you need the website to include cookies in the requests sent
// to the API (e.g. in case you use sessions)
res.setHeader('Access-Control-Allow-Credentials', true);
// Pass to next layer of middleware
next();
});
app.get("/",(request,response)=>{
response.send("hello world!");
});
http.listen(port,function(){
console.log(server.address());
console.log("listening on port "+port);
});
I have the domain name of my server and I thought that adding ":3000" at the end of it will let me access the app but obviously it doesn't, I wanna know how to access it.
node.js express url routing ip
add a comment |
I have deployed my Nodejs Express app on GoDaddy using ssh access to configure the whole thing. But I can't find the URL that leads me to my app.
it works perfectly on my computer where I access the app via the link http://localhost:3000
const express = require("express");
const bodyParser = require("body-parser");
const httpRequest = require("request");
const app = new express();
const http = require("http").Server(app);
const io = require("socket.io")(http);
app.set("view engine","ejs");
var port = process.env.PORT || 3000;
app.use(express.static("public"));
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json())
//headers
app.use(function (req, res, next) {
// Website you wish to allow to connect
res.setHeader('Access-Control-Allow-Origin', '*');
// Request methods you wish to allow
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT,
PATCH, DELETE');
// Request headers you wish to allow
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
// Set to true if you need the website to include cookies in the requests sent
// to the API (e.g. in case you use sessions)
res.setHeader('Access-Control-Allow-Credentials', true);
// Pass to next layer of middleware
next();
});
app.get("/",(request,response)=>{
response.send("hello world!");
});
http.listen(port,function(){
console.log(server.address());
console.log("listening on port "+port);
});
I have the domain name of my server and I thought that adding ":3000" at the end of it will let me access the app but obviously it doesn't, I wanna know how to access it.
node.js express url routing ip
What is your Server OS? Is it dedicated server? If your server is shared one then PORT 3000 or Whatever port is set in env. that need to be allow to public access. You may will contact to GoDaddy Customer Care to enable the port for public access.
– Soham Krishna Paul
2 days ago
add a comment |
I have deployed my Nodejs Express app on GoDaddy using ssh access to configure the whole thing. But I can't find the URL that leads me to my app.
it works perfectly on my computer where I access the app via the link http://localhost:3000
const express = require("express");
const bodyParser = require("body-parser");
const httpRequest = require("request");
const app = new express();
const http = require("http").Server(app);
const io = require("socket.io")(http);
app.set("view engine","ejs");
var port = process.env.PORT || 3000;
app.use(express.static("public"));
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json())
//headers
app.use(function (req, res, next) {
// Website you wish to allow to connect
res.setHeader('Access-Control-Allow-Origin', '*');
// Request methods you wish to allow
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT,
PATCH, DELETE');
// Request headers you wish to allow
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
// Set to true if you need the website to include cookies in the requests sent
// to the API (e.g. in case you use sessions)
res.setHeader('Access-Control-Allow-Credentials', true);
// Pass to next layer of middleware
next();
});
app.get("/",(request,response)=>{
response.send("hello world!");
});
http.listen(port,function(){
console.log(server.address());
console.log("listening on port "+port);
});
I have the domain name of my server and I thought that adding ":3000" at the end of it will let me access the app but obviously it doesn't, I wanna know how to access it.
node.js express url routing ip
I have deployed my Nodejs Express app on GoDaddy using ssh access to configure the whole thing. But I can't find the URL that leads me to my app.
it works perfectly on my computer where I access the app via the link http://localhost:3000
const express = require("express");
const bodyParser = require("body-parser");
const httpRequest = require("request");
const app = new express();
const http = require("http").Server(app);
const io = require("socket.io")(http);
app.set("view engine","ejs");
var port = process.env.PORT || 3000;
app.use(express.static("public"));
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
// parse application/json
app.use(bodyParser.json())
//headers
app.use(function (req, res, next) {
// Website you wish to allow to connect
res.setHeader('Access-Control-Allow-Origin', '*');
// Request methods you wish to allow
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT,
PATCH, DELETE');
// Request headers you wish to allow
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
// Set to true if you need the website to include cookies in the requests sent
// to the API (e.g. in case you use sessions)
res.setHeader('Access-Control-Allow-Credentials', true);
// Pass to next layer of middleware
next();
});
app.get("/",(request,response)=>{
response.send("hello world!");
});
http.listen(port,function(){
console.log(server.address());
console.log("listening on port "+port);
});
I have the domain name of my server and I thought that adding ":3000" at the end of it will let me access the app but obviously it doesn't, I wanna know how to access it.
node.js express url routing ip
node.js express url routing ip
asked 2 days ago
Abibad Abdou
4111
4111
What is your Server OS? Is it dedicated server? If your server is shared one then PORT 3000 or Whatever port is set in env. that need to be allow to public access. You may will contact to GoDaddy Customer Care to enable the port for public access.
– Soham Krishna Paul
2 days ago
add a comment |
What is your Server OS? Is it dedicated server? If your server is shared one then PORT 3000 or Whatever port is set in env. that need to be allow to public access. You may will contact to GoDaddy Customer Care to enable the port for public access.
– Soham Krishna Paul
2 days ago
What is your Server OS? Is it dedicated server? If your server is shared one then PORT 3000 or Whatever port is set in env. that need to be allow to public access. You may will contact to GoDaddy Customer Care to enable the port for public access.
– Soham Krishna Paul
2 days ago
What is your Server OS? Is it dedicated server? If your server is shared one then PORT 3000 or Whatever port is set in env. that need to be allow to public access. You may will contact to GoDaddy Customer Care to enable the port for public access.
– Soham Krishna Paul
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
You might have to open the port first. The way you do it depends on what you use, with Linux-like OS and ufw you could do
sudo ufw allow 3000
You can find more information and docs here:
ufw - Uncomplicated Firewall
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
add a comment |
Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:
- Log in to your GoDaddy account.
- In your My Products page, click Servers.
- Next to the server you want to use, click Manage. The server IP address appears in the
- Details tab. You may need to scroll down to see the address in the list.
Usege:
http://youripaddress:3000
I did that but it doesn't work , I still can't access my app
– Abibad Abdou
2 days ago
Then try to open the port as described above. or make sure it's opened: sudo ufw status
– Igor Litvinovich
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
Which OS do you use?
– Igor Litvinovich
2 days ago
BTW, you can run your application on port 80 and it's going to work. can you try it?
– Igor Litvinovich
2 days ago
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53944981%2fwhat-is-the-url-with-which-i-can-access-my-expess-app-nodejs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You might have to open the port first. The way you do it depends on what you use, with Linux-like OS and ufw you could do
sudo ufw allow 3000
You can find more information and docs here:
ufw - Uncomplicated Firewall
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
add a comment |
You might have to open the port first. The way you do it depends on what you use, with Linux-like OS and ufw you could do
sudo ufw allow 3000
You can find more information and docs here:
ufw - Uncomplicated Firewall
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
add a comment |
You might have to open the port first. The way you do it depends on what you use, with Linux-like OS and ufw you could do
sudo ufw allow 3000
You can find more information and docs here:
ufw - Uncomplicated Firewall
You might have to open the port first. The way you do it depends on what you use, with Linux-like OS and ufw you could do
sudo ufw allow 3000
You can find more information and docs here:
ufw - Uncomplicated Firewall
answered 2 days ago


Xzandro
54228
54228
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
add a comment |
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
add a comment |
Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:
- Log in to your GoDaddy account.
- In your My Products page, click Servers.
- Next to the server you want to use, click Manage. The server IP address appears in the
- Details tab. You may need to scroll down to see the address in the list.
Usege:
http://youripaddress:3000
I did that but it doesn't work , I still can't access my app
– Abibad Abdou
2 days ago
Then try to open the port as described above. or make sure it's opened: sudo ufw status
– Igor Litvinovich
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
Which OS do you use?
– Igor Litvinovich
2 days ago
BTW, you can run your application on port 80 and it's going to work. can you try it?
– Igor Litvinovich
2 days ago
|
show 1 more comment
Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:
- Log in to your GoDaddy account.
- In your My Products page, click Servers.
- Next to the server you want to use, click Manage. The server IP address appears in the
- Details tab. You may need to scroll down to see the address in the list.
Usege:
http://youripaddress:3000
I did that but it doesn't work , I still can't access my app
– Abibad Abdou
2 days ago
Then try to open the port as described above. or make sure it's opened: sudo ufw status
– Igor Litvinovich
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
Which OS do you use?
– Igor Litvinovich
2 days ago
BTW, you can run your application on port 80 and it's going to work. can you try it?
– Igor Litvinovich
2 days ago
|
show 1 more comment
Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:
- Log in to your GoDaddy account.
- In your My Products page, click Servers.
- Next to the server you want to use, click Manage. The server IP address appears in the
- Details tab. You may need to scroll down to see the address in the list.
Usege:
http://youripaddress:3000
Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:
- Log in to your GoDaddy account.
- In your My Products page, click Servers.
- Next to the server you want to use, click Manage. The server IP address appears in the
- Details tab. You may need to scroll down to see the address in the list.
Usege:
http://youripaddress:3000
answered 2 days ago
Igor Litvinovich
53419
53419
I did that but it doesn't work , I still can't access my app
– Abibad Abdou
2 days ago
Then try to open the port as described above. or make sure it's opened: sudo ufw status
– Igor Litvinovich
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
Which OS do you use?
– Igor Litvinovich
2 days ago
BTW, you can run your application on port 80 and it's going to work. can you try it?
– Igor Litvinovich
2 days ago
|
show 1 more comment
I did that but it doesn't work , I still can't access my app
– Abibad Abdou
2 days ago
Then try to open the port as described above. or make sure it's opened: sudo ufw status
– Igor Litvinovich
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
Which OS do you use?
– Igor Litvinovich
2 days ago
BTW, you can run your application on port 80 and it's going to work. can you try it?
– Igor Litvinovich
2 days ago
I did that but it doesn't work , I still can't access my app
– Abibad Abdou
2 days ago
I did that but it doesn't work , I still can't access my app
– Abibad Abdou
2 days ago
Then try to open the port as described above. or make sure it's opened: sudo ufw status
– Igor Litvinovich
2 days ago
Then try to open the port as described above. or make sure it's opened: sudo ufw status
– Igor Litvinovich
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago
Which OS do you use?
– Igor Litvinovich
2 days ago
Which OS do you use?
– Igor Litvinovich
2 days ago
BTW, you can run your application on port 80 and it's going to work. can you try it?
– Igor Litvinovich
2 days ago
BTW, you can run your application on port 80 and it's going to work. can you try it?
– Igor Litvinovich
2 days ago
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53944981%2fwhat-is-the-url-with-which-i-can-access-my-expess-app-nodejs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
EcN9MjqUeY aakNfoZop5t5fx2P
What is your Server OS? Is it dedicated server? If your server is shared one then PORT 3000 or Whatever port is set in env. that need to be allow to public access. You may will contact to GoDaddy Customer Care to enable the port for public access.
– Soham Krishna Paul
2 days ago