Created
July 20, 2017 00:35
-
-
Save caioregatieri/4f07cb7735dd193d157a02af95422df9 to your computer and use it in GitHub Desktop.
This file contains 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
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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Certinho