new to node development.
var app = require('express')()
, server = require('http').createServer(app)
, io = require('socket.io').listen(server);
my content gets as below
server.listen(1337);
app.get('/', function (req, res) {
res.sendfile(__dirname + '/index.html');
});
I am trying to get static file as below
server.use("/", app.static(__dirname + '/'));
but it doesnt wonk getting errors.
How to get staTIC files?
the static function is a method on the express module.
So it should be:
just read express docs