config.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. -- Part of nodemcu-httpserver, contains static configuration for httpserver.
  2. -- Author: Sam Dieck
  3. conf = {}
  4. conf.hostname = "NODEMCU-WEBIDE" -- DNS host name send to DHCP server (don't use underscore)
  5. -- Basic Authentication Conf
  6. conf.auth = {}
  7. conf.auth.enabled = true
  8. conf.auth.realm = "nodemcu-httpserver" -- displayed in the login dialog users get
  9. conf.auth.user = "login" -- PLEASE change this
  10. conf.auth.password = "Passw0rd" -- PLEASE change this
  11. -- WiFi configuration
  12. conf.wifi = {}
  13. -- wifi.STATION (join a WiFi network)
  14. -- wifi.SOFTAP (create a WiFi network)
  15. -- wifi.STATIONAP (STATION + SOFTAP)
  16. conf.wifi.mode = wifi.SOFTAP -- default: SOFTAP (avoid try to connect an invalid AP)
  17. -- STATION config
  18. --conf.wifi.stassid = "YourSSID" -- Name of the WiFi network you want to join
  19. --conf.wifi.stapwd = "PleaseInputYourPasswordHere" -- Password for the WiFi network
  20. -- SOFTAP config
  21. conf.wifi.ap = {}
  22. conf.wifi.ap.ssid = "ESP-"..node.chipid() -- Name of the SSID you want to create
  23. conf.wifi.ap.pwd = "Pass"..node.chipid() -- PLEASE change this (at least 8 characters)
  24. conf.wifi.apip = {}
  25. conf.wifi.apip.ip = "192.168.111.1"
  26. conf.wifi.apip.netmask = "255.255.255.0"
  27. conf.wifi.apip.gateway = "0.0.0.0" -- avoid mobile cannot access internet issue