Skip to content

Instantly share code, notes, and snippets.

@jeyziel
Created July 20, 2017 19:43
Show Gist options
  • Save jeyziel/8a785802cd96c6f09860e9a1609e1b70 to your computer and use it in GitHub Desktop.
Save jeyziel/8a785802cd96c6f09860e9a1609e1b70 to your computer and use it in GitHub Desktop.
const express = require('express')
const app = express()
const port = 3000
app.get('/somar', (req, res) =>{
const sum = parseInt(req.query.num1) + parseInt(req.query.num2)
res.send('A soma é: ' + sum)
})
app.listen(port,() => console.log('Serve running on port' + port))
@tuliofaria
Copy link

Certinho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment