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

Multi tool use
Multi tool use












0














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.










share|improve this question






















  • 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


















0














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.










share|improve this question






















  • 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
















0












0








0







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.










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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




















  • 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














2 Answers
2






active

oldest

votes


















0














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






share|improve this answer





















  • when i execute sudo I get : bash: sudo : command not found
    – Abibad Abdou
    2 days ago



















0














Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:




  1. Log in to your GoDaddy account.

  2. In your My Products page, click Servers.

  3. Next to the server you want to use, click Manage. The server IP address appears in the

  4. Details tab. You may need to scroll down to see the address in the list.


Usege:



http://youripaddress:3000





share|improve this answer





















  • 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











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
});


}
});














draft saved

draft discarded


















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









0














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






share|improve this answer





















  • when i execute sudo I get : bash: sudo : command not found
    – Abibad Abdou
    2 days ago
















0














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






share|improve this answer





















  • when i execute sudo I get : bash: sudo : command not found
    – Abibad Abdou
    2 days ago














0












0








0






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






share|improve this answer












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







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









Xzandro

54228




54228












  • 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




when i execute sudo I get : bash: sudo : command not found
– Abibad Abdou
2 days ago













0














Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:




  1. Log in to your GoDaddy account.

  2. In your My Products page, click Servers.

  3. Next to the server you want to use, click Manage. The server IP address appears in the

  4. Details tab. You may need to scroll down to see the address in the list.


Usege:



http://youripaddress:3000





share|improve this answer





















  • 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
















0














Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:




  1. Log in to your GoDaddy account.

  2. In your My Products page, click Servers.

  3. Next to the server you want to use, click Manage. The server IP address appears in the

  4. Details tab. You may need to scroll down to see the address in the list.


Usege:



http://youripaddress:3000





share|improve this answer





















  • 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














0












0








0






Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:




  1. Log in to your GoDaddy account.

  2. In your My Products page, click Servers.

  3. Next to the server you want to use, click Manage. The server IP address appears in the

  4. Details tab. You may need to scroll down to see the address in the list.


Usege:



http://youripaddress:3000





share|improve this answer












Use Ip address of your GoDaddy virtual machine.
to find it follow the instruction below:




  1. Log in to your GoDaddy account.

  2. In your My Products page, click Servers.

  3. Next to the server you want to use, click Manage. The server IP address appears in the

  4. Details tab. You may need to scroll down to see the address in the list.


Usege:



http://youripaddress:3000






share|improve this answer












share|improve this answer



share|improve this answer










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


















  • 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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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
ZzCbTcuy OERT oP BjF081tnTwXunxUljqSFPh j88A2Wk

Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas