Skip to content

Instantly share code, notes, and snippets.

@caioregatieri
Created July 20, 2017 00:35
Show Gist options
  • Save caioregatieri/4f07cb7735dd193d157a02af95422df9 to your computer and use it in GitHub Desktop.
Save caioregatieri/4f07cb7735dd193d157a02af95422df9 to your computer and use it in GitHub Desktop.
const express = require('express')
const app = express()
const port = 3000
app.get('/somar', (request, response) => {
var num1 = parseFloat(request.query.num1);
var num2 = parseFloat(request.query.num2);
response.send('A soma é: ' + (num1 + num2));
})
app.listen(port, () => console.log('Server running on ' + port))
@tuliofaria
Copy link

Certinho

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