Skip to content

Instantly share code, notes, and snippets.

@muddydixon
Created February 20, 2014 04:14
Show Gist options
  • Save muddydixon/9106999 to your computer and use it in GitHub Desktop.
Save muddydixon/9106999 to your computer and use it in GitHub Desktop.
Nodeでサーバ立てる
node -e 'var fs=require("fs"), path = require("path"); require("http").createServer(function(req, res){ url = path.join(__dirname, req.url); res.end(fs.readFileSync(url.replace(/\/$/, "/index.html"), "utf8"))}).listen(8000)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment