Message from @Durtle02
Discord ID: 462138508576948226
Was trying to follow some tutorial
```js
var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io')(server);
app.use(express.static(__dirname + '/bower_components'));
app.get('/', function(req, res,next) {
res.sendFile(__dirname + '/index.html');
});
io.on('connection', function(client) {
console.log('Client connected...');
client.on('join', function(data) {
console.log(data);
client.emit('messages', 'Hello from server');
});
});
server.listen(4200, function() {
console.log('Server running...');
}); ```
something like this?
I gtg in like 2 mins lol
Yeah something similar
now that's the server file right?
also i can pick up "tomorrow " if needed
yes
that is an example "app.js" or whatever you want to call it
here is the tutorial I took that example from
and i'd run "node app" from ssh?
if you were ssh'ing into your server, yes
redd ~$ node ./app
Server running...
something like that
pretty sure you don't need the `./` part tho
whatever works ¯\_(ツ)_/¯
and then what would be the client side url
if you are running it on your computer, `http://localhost:4200/`
if you are running on a server, `http://<server ip>:4200/`
what do you mean by that?
like, through bluehost
i cant open ports and dont have access to 80 so I dont think i can do it
you can use any port
they have them all closed
?
open a support ticket
you are missing something
wait
do you have root access to the server?
dont think so
try `sudo node app`
then type your password
I really gtg
alright cya
but if that doesn't work, ask them about server hosting on port 80
I'm in jailshell
that's my ssh
they are a webhosting company, it needs to work lol