Skip to content

Instantly share code, notes, and snippets.

@wescleymatos
Created July 20, 2017 02:09
Show Gist options
  • Save wescleymatos/2e75edf39c06ee22485e0a8a6be8c428 to your computer and use it in GitHub Desktop.
Save wescleymatos/2e75edf39c06ee22485e0a8a6be8c428 to your computer and use it in GitHub Desktop.
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}`))
@tuliofaria
Copy link

Certinho.

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