Skip to content

Instantly share code, notes, and snippets.

@mbenitez01
mbenitez01 / tinystore.js
Created February 3, 2022 00:00 — forked from boxmein/tinystore.js
A really tiny JSON encrypted-and-compressed datastore
// Dead simple compressed and encrypted datastore
var crypto = require('crypto');
var zlib = require('zlib');
var fs = require('fs');
var stream = require('stream');
// Load the session store from #{filename} and decrypt it using #{method} with
// the key #{key}.
// @param filename {String} filename
// @param key the encryption key, can be a string or buffer
@mbenitez01
mbenitez01 / fetch-api-examples.md
Created May 13, 2020 01:42 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@mbenitez01
mbenitez01 / ESPWebSock.ino
Created March 24, 2018 17:05 — forked from bbx10/ESPWebSock.ino
ESP8266 Web server with Web Socket to control an LED
/*
* ESP8266 Web server with Web Socket to control an LED.
*
* The web server keeps all clients' LED status up to date and any client may
* turn the LED on or off.
*
* For example, clientA connects and turns the LED on. This changes the word
* "LED" on the web page to the color red. When clientB connects, the word
* "LED" will be red since the server knows the LED is on. When clientB turns
* the LED off, the word LED changes color to black on clientA and clientB web

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.