I'm trying to setup a nodejs based server, but unfortunately, when ever I run it via terminal, node app.js
it returns console log thing what ever I declare in app.js
file, and after that, it stuck, I can't not use it to process more tasks.
var http = require('http');
var express = require("express");
var app = express();
app.get('/files/:hash/:title', function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(JSON.stringify(req.params));
console.log('Done');
});
app.listen(8080);
console.log('Server running');
and terminal's response
root@mrboota13:/var/Node# node app.js
Server running
Done
Done
Done
Done
Done
Done
Done
via Mr Boota
No comments:
Post a Comment