I'm a php developer
I've a setup of virtual host on my apache
<VirtualHost sub.domain.com:80>
ServerName sub.domain.com
ServerAdmin localhost@domain.com
DocumentRoot /var/www/subpart/html
<Directory /var/www/subpart/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apa$
# default start page (in /apache2-default) when y$
#RedirectMatch ^/$ /apache2-default/
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
here is my app.js file
var express = require('express');
var bodyParse = require('body-parser');
var request = require('request');
var app = express();
// var select = require('./select');
app.set('port', 8080);
app.use(bodyParse.urlencoded({extended: false}));
app.use(bodyParse.json());
app.get('/', function(req, res) {
res.send('yelo');
})
app.listen(app.get('port'), function() {
console.log('running on port', app.get('port'))
})
when i run nodemon app.js
i can access this application on http:\\localhost:8080\
but the same application is when uploaded to live server acts weird https:\\sub.domain.com:8080\
with error unable to connect
I've no idea what is going on, i'm a php dev and all i had to do was just copy and paste file on server and everything worked find, but i'm having a lot of issue with nodejs implementation