Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 26, 2020 21:15
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/1555726723dc0cd8964f8ccafc66475f to your computer and use it in GitHub Desktop.
Save parzibyte/1555726723dc0cd8964f8ccafc66475f to your computer and use it in GitHub Desktop.
// Servir la página web
void rutaRaiz()
{
servidor.send(200, "text/html", "<!DOCTYPE html>"
"<html>"
"<head>"
"<meta charset='utf-8'>"
"<meta name='viewport' content='width=device-width'>"
"<title>Servidor web con ESP8266</title>"
"</head>"
"<body>"
"<p>Soy un servidor web embebido dentro de la NodeMCU ESP8266</p>"
"<a href='https://parzibyte.me/blog'>By Parzibyte</a>"
"</body>"
"</html>");
}
// Manejador de 404
void rutaNoEncontrada()
{
servidor.send(404, "text/plain", "No encontrado");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment