{"id":14967624,"url":"https://github.com/projetsdiy/fast-esp8266-html-js-development-with-nodejs-pug","last_synced_at":"2025-10-10T04:17:07.673Z","repository":{"id":201699491,"uuid":"101290049","full_name":"projetsdiy/Fast-ESP8266-HTML-JS-development-with-Nodejs-Pug","owner":"projetsdiy","description":"Fast ESP8266 WebServer development with Nodejs and Pug","archived":false,"fork":false,"pushed_at":"2017-08-25T11:11:14.000Z","size":135,"stargazers_count":20,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T10:11:21.572Z","etag":null,"topics":["dht22","esp8266","html","js","nodejs","pug","pugjs","webserver"],"latest_commit_sha":null,"homepage":"https://diyprojects.io/esp8266-web-server-fast-development-of-html-js-with-node-js-and-pug/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projetsdiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-08-24T11:58:31.000Z","updated_at":"2023-12-18T04:35:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"90096c84-77ea-46af-82dc-e4fc5fa81195","html_url":"https://github.com/projetsdiy/Fast-ESP8266-HTML-JS-development-with-Nodejs-Pug","commit_stats":null,"previous_names":["projetsdiy/fast-esp8266-html-js-development-with-nodejs-pug"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/projetsdiy/Fast-ESP8266-HTML-JS-development-with-Nodejs-Pug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projetsdiy%2FFast-ESP8266-HTML-JS-development-with-Nodejs-Pug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projetsdiy%2FFast-ESP8266-HTML-JS-development-with-Nodejs-Pug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projetsdiy%2FFast-ESP8266-HTML-JS-development-with-Nodejs-Pug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projetsdiy%2FFast-ESP8266-HTML-JS-development-with-Nodejs-Pug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projetsdiy","download_url":"https://codeload.github.com/projetsdiy/Fast-ESP8266-HTML-JS-development-with-Nodejs-Pug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projetsdiy%2FFast-ESP8266-HTML-JS-development-with-Nodejs-Pug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002689,"owners_count":26083442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dht22","esp8266","html","js","nodejs","pug","pugjs","webserver"],"created_at":"2024-09-24T13:38:22.446Z","updated_at":"2025-10-10T04:17:07.630Z","avatar_url":"https://github.com/projetsdiy.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fast ESP8266 webserver development (HTML + JS) with Nodejs and Pug (Old Jade)\n## Equipment used\n* Any ESP8266 ESP-12 module, for example \u003ca href=\"http://www.banggood.com/search/esp8266-nodemcu/0-0-0-1-3-45-0-price-0-0_p-1.html?sortType=asc?p=RA18043558422201601Y\" target=\"_blank\" rel=\"nofollow\" data-mce-href=\"http://www.banggood.com/search/esp8266-nodemcu/0-0-0-1-3-45-0-price-0-0_p-1.html?sortType=asc?p=RA18043558422201601Y\"\u003eWemos D1 mini\u003c/a\u003e\n* \u003ca href=\"http://s.click.aliexpress.com/e/BeYvjyfim\" target=\"_blank\" rel=\"nofollow\" data-mce-href=\"http://s.click.aliexpress.com/e/BeYvjyfim\"\u003eDHT22\u003c/a\u003e Temperature and humidity sensor\n\n## Wiring\n|Sensor |Pin |ESP8266 Pin|\n|-------|----|----------:|\n|DHT22  |VCC |5V         |\n|       |GND |G          |\n|       |Data|D4         |\n\n## Project content\n* Installation of Nodejs\n* Installation of Pug (former Jade) to quickly write the HTML of the projects ESP8266\n* Install nodemon to update server-side code every time\n\n## Server code (Nodejs)\n* Server code can be run on any machine that can run Nodejs (PC Winodws, Linux, Mac OS, Raspberry Pi, Orange Pi ...)\n* Server code allows:\n  \n  * Responding to requests from the web interface. For example, send a test dataset\n  \n  * Recover the state of the GPIO\n* Code Arduino / ESP8266\n  \n  * Web interface developed in Pug to display temperature, humidity, measurements with a graph \u003ca href= \"https://projetsdiy.fr/esp8266-web-serveur-partie5-gauges-Graphics-google-charts/\"\u003eGoogle Chart\u003c/a\u003e, the status of the GPIO\n  \n  * Storing a measurement history \u003ca href=\"https://projectsdiy.fr/esp8266-webserveur-partie4-arduinojson-charger-register-files-spiffs/\"\u003ein JSON format in the SPIFFS area\u003c/a\u003e\n  \n  * Manages GPIO status refresh requests from the web interface or a remote server\n  \n  * Send measurements in the form of a JSON array (remote server request or WEB interface)\n  \n  * Retrieves time from an NTP time server. For more information, read \u003ca href=\"https://projectsdiy.com/esp8266-web-server-partial3-time-internet-ntp-ntpclientlib/\"\u003ethis tutorial\u003c/a\u003e\n\n# Programmation web serveur rapide pour ESP8266 avec Nodejs et Pug\nLe tutoriel complet ici\nhttps://projetsdiy.fr/esp8266-web-serveur-developpement-rapide-code-htmljs-node-js-pug/\n## Matériel utilisé\n* N'importe quel ESP8266 (ESP-12x), par exemple \u003ca href=\"http://www.banggood.com/search/esp8266-nodemcu/0-0-0-1-3-45-0-price-0-0_p-1.html?sortType=asc?p=RA18043558422201601Y\" target=\"_blank\" rel=\"nofollow\" data-mce-href=\"http://www.banggood.com/search/esp8266-nodemcu/0-0-0-1-3-45-0-price-0-0_p-1.html?sortType=asc?p=RA18043558422201601Y\"\u003eWemos D1 mini\u003c/a\u003e\n* \u003ca href=\"http://s.click.aliexpress.com/e/BeYvjyfim\" target=\"_blank\" rel=\"nofollow\" data-mce-href=\"http://s.click.aliexpress.com/e/BeYvjyfim\"\u003eDHT22\u003c/a\u003e capteur de température et d'humitité\n\n## Cablage\n|Sensor |Broche |Broche ESP8266|\n|-------|-------|-------------:|\n|DHT22  |VCC    |5V            |\n|       |GND    |G             |\n|       |Data   |D4            |\n\n## Contenu du projet\n* Installation de Nodejs\n* Installation de Pug (ancien Jade) pour écrire rapidement le code HTML du projets ESP8266\n* Installation de nodemon pour actualiser le code coté serveur à chaque modification\n\n## Code serveur (Nodejs)\n* Le code serveur peut être exécuter sur n'importe quelle machine pouvant faire fonctionner Nodejs (PC Winodws, Linux, mac OS, Raspberry Pi, Orange Pi...)\n* Le code serveur permet :\n  \n  * De réponse aux requêtes de l'interface web. Par exemple envoyer un jeu de données test\n  \n  * De récupérer l'état du GPIO\n* Code Arduino/ESP8266\n  * Interface Web développée en Pug permettant d'afficher la température, l'humidité, les mesures à l'aide d'un graphique \u003ca href=\"https://projetsdiy.fr/esp8266-web-serveur-partie5-gauges-graphiques-google-charts/\"\u003eGoogle Chart\u003c/a\u003e, le statut du GPIO\n  \n  * Stockage un historique de mesure \u003ca href=\"https://projetsdiy.fr/esp8266-webserveur-partie4-arduinojson-charger-enregistrer-fichiers-spiffs/\"\u003eau format JSON dans la zone SPIFFS\u003c/a\u003e\n  \n  * Gère les requêtes d'actualise d'état du GPIO depuis l'interface web ou un serveur distant\n  \n  * Envoi les mesures sous la forme d'un tableau JSON (requête serveur distant ou interface WEB)\n  \n  * Récupère le temps depuis un serveur de temps NTP. Pour en savoir plus, lisez \u003ca href=\"https://projetsdiy.fr/esp8266-web-serveur-partie3-heure-internet-ntp-ntpclientlib/\"\u003ece tutoriel\u003c/a\u003e\n  \n\u003cimg align=\"center\" src=\"https://github.com/projetsdiy/Fast-ESP8266-HTML-JS-development-with-Nodejs-Pug/blob/master/nodejs-esp8266-donnees-reelles.jpg\" style=\"max-width:100%;\"\u003e\n\nLicence : MIT\n\nCopyright : www.projetsdiy.fr and www.diyprojects.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojetsdiy%2Ffast-esp8266-html-js-development-with-nodejs-pug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojetsdiy%2Ffast-esp8266-html-js-development-with-nodejs-pug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojetsdiy%2Ffast-esp8266-html-js-development-with-nodejs-pug/lists"}