Upgrade to Pro — share decks privately, control downloads, hide ads and more …

node.js #TechLunch

node.js #TechLunch

node.js
2013/12/04 (水) @ Livesense TechLunch
発表者:劉 俊峰

Livesense Inc.

April 21, 2014
Tweet

More Decks by Livesense Inc.

Other Decks in Technology

Transcript

  1. S \

  2. var http = require('http'); var fs = require('fs'); var server

    = http.createServer(function(req, res) { fs.readFile('contents.file', function(error, contents) { res.writeHead(200,{'Content-Type':'text/plain; charset=utf-8'}); res.write(contents); res.end(); //^V }); }); server.listen(3000);