Posted By

ironicnet on 05/27/13


Tagged

server connect nodejs


Versions (?)

Simple File Http Server in NodeJS with Connect


 / Published in: JavaScript
 

  1. //Remember to do a basic "npm install connect" before executing
  2. var connect = require('connect');
  3. var port = 3000;
  4. connect.createServer(
  5. connect.static(__dirname)
  6. ).listen(port);
  7.  
  8. console.info("Listening port " + port.toString() + " from: " + __dirname);

Report this snippet  

You need to login to post a comment.