DISCLAIMER: Não é intenção deste guia ser genérico. Mas sim ser rápido e direto.
EDIT: Atualizado para TS 2.0 não ser mais beta.
- Visual Studio Code (!= Visual Studio). Como eu disse, o guia não é pra ser genérico. Isso não quer dizer que você não
const http = require('http') | |
const fs = require('fs') | |
const index = fs.readFileSync('./04.html'); | |
const app = http.createServer((req, res) => { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
res.end(index); | |
}).listen(8080) |
const http = require('http') | |
const fs = require('fs') | |
const index = fs.readFileSync('./04.html'); | |
const app = http.createServer((req, res) => { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
res.end(index); | |
}).listen(8080) |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Workshop Socket.io - Events</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1>socket.io - Events</h1> | |
<p id="console"></p> |
const http = require('http') | |
const fs = require('fs') | |
const index = fs.readFileSync('./04.html'); | |
const app = http.createServer((req, res) => { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
res.end(index); | |
}).listen(8080) |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Workshop Socket.io - Events</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1>socket.io - Events</h1> | |
<input type="text" id="nameuser"> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Workshop Socket.io - Events</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1>socket.io - Events</h1> | |
<h2>Sala <span id="myroom"></span></h2> |
const http = require('http') | |
const fs = require('fs') | |
const index = fs.readFileSync('05-users.html'); | |
const app = http.createServer((req, res) => { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
res.end(index); | |
}).listen(8080) |
DISCLAIMER: Não é intenção deste guia ser genérico. Mas sim ser rápido e direto.
EDIT: Atualizado para TS 2.0 não ser mais beta.
MongoDB é um Banco de Dados noSQL (Not Only SQL), também podemos dizer que é um banco não relacional. Grande parte de seus recursos, características e funcionalidades do MongoDB assenta no fato que é um Banco de Dados Orientado a Documentos (Document Database). Ao discutir/trabalhar/utilizar modelos de dado, modelagem, consulta (queries), e dados salvo no MongoDB, nós utilizamos JSON (JavaScript Object Notation).
Exemplo:
{
['suIssa', 'bEto', 'carlao', 'd'].map(item => item.split('').reverse().pop().toUpperCase()+item.slice(1).toLowerCase()) |