3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Node.js入門

Last updated at Posted at 2018-12-02

概要

  • ドットインストールで勉強していくメモ。
  • 大量のリクエストを捌くのに向いている。

公式サイト

知識

  • HTML/JavaScript

簡単なwebserverを作ってみよう

server.js
var http = require('http');

var server = http.createServer();

server.on('request', function(req, res){
 res.writeHead(200,{'Content-Type':'text/plain'});
 res.write('hello world');
 res.end();
});

server.listen(1337,'xxx.xxx.xxx.xxx');

console.log("server litening....");
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?