This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDR+iJHMRGDa3ybZ3yrlqyyaJxORWoSoDkgXOPrNKjqANvhnGgjTr120Os5b+Rpe125wOwh0cBb5oHTKdCQEIjlAkvPK5F4EcbPC7iQ95LFaUcWxTB0lKQFhnvEEJF5foYf5wlDZh/I/Scm0oGVl5fRuDgoqXR4fddJUYTS5GwpwOPx9tyKGqskyBh4IjVs1IclAw0uaTssxDtL7wi+1bWxgmN/DYdNXFKkWmBDrxL/VxLFhq4Tq+Ckm05kIkwf30QJ4F4rdFYZuvV7v7Abj5upuN+SvxnHWb5s+yvQmyon9xim3mgK9gCFMnaO49ggC49Gh6kVXgxMC7p8jZdBB19R [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save-dev istanbul |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "# Coverage reports\ncoverage\ncoverage/\ncoverage/*\n" >> .gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- ./test/* --recursive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// ... | |
"scripts": { | |
// ... | |
"coverage": "istanbul cover _mocha -- ./test/* --recursive" | |
} | |
// ... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install babel-istanbul --save-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// ... | |
"scripts": { | |
// ... | |
"coverage": "babel-node node_modules/.bin/babel-istanbul cover _mocha -- ./test/* --recursive" | |
} | |
// ... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import bodyParser from 'body-parser'; | |
import morgan from 'morgan'; | |
import socketio from 'socket.io'; // importando o socket.io | |
import http from 'http'; // talvez no seu projeto você não importe a biblioteca http, mas aqui é necessário | |
const app = express(); | |
app.use(morgan('dev')); | |
app.use(bodyParser.urlencoded({ extended: true })); | |
app.use(bodyParser.json()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Websocket tutorial</title> | |
<script src="http://localhost:3000/socket.io/socket.io.js"></script> <!-- pegando a dependência do servidor --> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Websocket tutorial</title> | |
<script src="http://localhost:3000/socket.io/socket.io.js"></script> | |
</head> | |
<body> |