Skip to content

Instantly share code, notes, and snippets.

@judsonmitchell
Last active December 28, 2015 08:08
Show Gist options
  • Save judsonmitchell/7469018 to your computer and use it in GitHub Desktop.
Save judsonmitchell/7469018 to your computer and use it in GitHub Desktop.
Start as simple web server using node.
npm install connect

Create file server.js

var connect = require('connect');
connect.createServer(
    connect.static(__dirname)
).listen(8080);

Run using node:

node server.js
@judsonmitchell
Copy link
Author

Note that this has changed as of Connect 3.x
See http://stackoverflow.com/a/24347442/49359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment