Created
March 18, 2016 03:29
-
-
Save leosilvadev/f01c4b0070b9f566fc94 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
| var express = require('express'); | |
| var app = express(); | |
| var bodyParser = require('body-parser'); | |
| //Aceitar requisições JSON (Content-Type: application/json) | |
| app.use(bodyParser.json()); | |
| app.post('/usuarios', function(request, response){ | |
| console.log(request.body);//JSON recebido | |
| response.json({mensagem:'Recebido!'});//Retornando JSON | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment