Created
July 20, 2017 02:09
-
-
Save wescleymatos/2e75edf39c06ee22485e0a8a6be8c428 to your computer and use it in GitHub Desktop.
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
const express = require('express') | |
const app = express() | |
const port = 3000 | |
app.get('/somar', (request, response) => { | |
let soma = (parseInt(request.query.num1) + parseInt(request.query.num2)) | |
response.end(`A soma é ${soma}`); | |
}); | |
app.listen(port, () => console.log(`Server running on port ${port}`)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Certinho.