Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8833

Node.jsに変わるかも?と言われている、Deno 1.0がリリースされたので素振りしてみた。

$
0
0

Deno1.0がリリースされたことで、twitterで界隈で話題になっていたので、素振りしてみた。(メモ程度です)

詳細は公式サイトをご確認ください。
https://deno.land/

まずは、インストール

brew install deno

これで準備はOK!まずは、「Getting Started」をやってみた。

実行コマンド: deno run (ファイル名)

deno run https://deno.land/std/examples/welcome.ts
// => Welcome to Deno 🦕

http://localhost:8000/にアクセスすると、「Hello World」が表示される。

hello_http.ts
import{serve}from"https://deno.land/std@0.50.0/http/server.ts";consts=serve({port:8000});console.log("http://localhost:8000/");forawait(constreqofs){req.respond({body:"Hello World\n"});}

以下で実行
deno run --allow-net hello_http.ts

今後もウォッチしていこう!


Viewing all articles
Browse latest Browse all 8833

Trending Articles