Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/rutas.cpp Secret

Created Dec 26, 2020
Embed
What would you like to do?
// 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