2
It’s like this:
<link rel="stylesheet" href="http://localhost/node/softmon/css/style.css" type="css">
If I put it like that:
<link rel="stylesheet" href="/css/style.css" type="css">
doesn’t work.
I use it to view the page ***http://localhost:3000***
app js.
var app = require('express')(),
http = require('http').Server(app),
io = require('socket.io')(http),
dbasy = require('./node_modules/dbasy/dbasy.js'),
$ = require('cheerio'),
jsdom = require("jsdom");
app.get('/', function(req, res) {
res.sendFile(__dirname + '/index.htm');
});
io.on('connection', function(socket) {
socket.on('operacoes', function(data) {
console.log()
});
socket.on('disconnect', function () {
console.log('Desconetado.');
});
});
http.listen(1589, function(){
console.log('Servidor iniciado.');
});
How to make Node identify the path from the root of the request ?
no view defined, I load the page directly from the app.get('/', Function(req, res) { res.sendFile(_dirname + '/index.htm'); });
– raddx