- We at Klarna (or at least in my team) do lot's of mobs
- Only watching your friend code? Not so fun
- Why not make writing code a co-op experience?
- Good way of pair/mob programming without a big screen
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
curl -X POST \ | |
https://protected-bastion-53873.herokuapp.com/api/products \ | |
-H 'authorization: d87cfe94-6665-4c63-b5b9-58a3c1498545' \ | |
-H 'cache-control: no-cache' \ | |
-H 'content-type: application/json' \ | |
-H 'postman-token: 16cf1324-58fb-da18-9741-0810db8e222a' \ | |
-d '{ | |
"price": 10, | |
"name": "Novo Produto" | |
}' |
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
package beerzeit.utils; | |
import org.apache.commons.io.IOUtils; | |
import org.primefaces.model.DefaultStreamedContent; | |
import org.primefaces.model.StreamedContent; | |
import org.primefaces.model.UploadedFile; | |
import java.io.*; | |
/** |
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> |
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'; | |
import http from 'http'; | |
import socketioJwt from 'socketio-jwt'; // nova dependência! | |
import jwt from 'jsonwebtoken'; // nova dependência! | |
import cors from 'cors'; // nova dependência! para fazer o login | |
const users = [ |
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'; | |
import http from 'http'; | |
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> | |
</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> <!-- 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
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
{ | |
// ... | |
"scripts": { | |
// ... | |
"coverage": "babel-node node_modules/.bin/babel-istanbul cover _mocha -- ./test/* --recursive" | |
} | |
// ... | |
} |
NewerOlder