Git Product home page Git Product logo

ehttpd's Introduction

ehttpd

ehttpd is a simple http server runs on ESP32 device. It only uses about 20K static allocated memory and Ragel generated state machine for URL routing. picohttpparser is used for HTTP header parsing. uriparser for http request path parsing. it also can be compiled to a host side simple http server for testing purpose.

Build

Setup ESP32-IDF environment

It uses ESP32-IDF to build and flash, please follow ESP-IDF Programming Guide to setup toolchain and build environment, make sure you can build hello world project by following Start a Project

Install prerequisites

Ragel is used to auto-generate C files, please install it

sudo apt install ragel

or build from scratch

wget http://www.colm.net/files/ragel/ragel-6.10.tar.gz
tar xpf ragel-6.10.tar.gz
./configure --prefix=/usr/local
make
sudo make install

build ehttpd

get the code:

git clone https://github.com/DavidPu/ehttpd.git $IDF_PATH/ehttpd

config the ehttpd:

cd $IDF_PATH/ehttpd
make menuconfig
# select your ESP32 USB serial port. make sure it can be read/write without sudo permission
# Serial flasher config
    # (/dev/ttyUSB0) default serial port
    # Flash size ---> 4M
# Example Configuration
  # setup your WIFI SSID and WiFIi password ESP32 board will connect to.

build and flash basic hello world echo server:

cd $IDF_PATH/ehttpd
make ehttpd_gen_c flash

ehttpd includes a Makefile.blockly.spiffs Makefile to build a complete Google Blockly-Games/maze web application and run on ESP-32. Run beow commands to build all related images and flash to ESP32 board:

sudo apt install zopfli
make -f Makefile.blockly.spiffs

ehttpd's People

Contributors

davidpu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.