# main.ino

- Project: [XDA](https://flashesp.com/explore/tzHyH5WIvfEbVYhjlYfUK.md) by AdamConwayIE
- Board: ESP32S3 Dev Module
- Language: Arduino (C++)
- Web page: https://flashesp.com/explore/tzHyH5WIvfEbVYhjlYfUK/files/iyEZvQ3CEblpP5p5cZfU0

```cpp
#include <WiFi.h>
#include <WebServer.h>

// Replace these with your Wi-Fi network credentials
const char* ssid = "xxx";
const char* password = "xxx";

WebServer server(80);  // HTTP server on port 80

void handleRoot() {
  server.send(200, "text/plain", "Hello world");
}

void setup() {
  Serial.begin(115200);

  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);

  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }

  // Configure the only route: "/"
  server.on("/", handleRoot);
  server.begin();
}

void loop() {
  server.handleClient();
}
```
