Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 1, 2020 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/73029e2deabd49b79bdcf5619771a669 to your computer and use it in GitHub Desktop.
Save parzibyte/73029e2deabd49b79bdcf5619771a669 to your computer and use it in GitHub Desktop.
app.post("/usuario", async (req, res) => {
// Dentro de req.body tenemos a todo el objeto. Podemos acceder a las claves del mismo como
// lo enviamos desde el cliente ;)
const nombre = req.body.nombre;
const web = req.body.web;
// Aquí hacer algo con las dos variables y responder la petición
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment