├── libs ├── .keep ├── module.c └── libevent.c ├── modules └── .keep ├── static ├── .keep ├── hello.txt └── index.html ├── example ├── routes.ini ├── deploy.bat ├── counter.c ├── websocket.c ├── static.c ├── cweb ├── readme.md ├── ws.html ├── json.c ├── todo.c ├── chat.c ├── webui.c └── auth.c ├── docker-compose.yml ├── include ├── container.h ├── defer.h ├── scheduler.h ├── libevent.h ├── map.h ├── queue.h ├── db.h ├── list.h ├── pool.h ├── router.h ├── crypto.h ├── cweb.h └── http.h ├── Dockerfile ├── .github └── workflows │ └── build.yml ├── .gitignore ├── production.sh ├── src ├── container.c ├── list.c ├── queue.c ├── engine.c ├── scheduler.c ├── map.c ├── db.c ├── pool.c ├── mngt.c ├── crypto.c ├── router.c ├── ws.c ├── http.c └── server.c ├── Makefile ├── CODE_OF_CONDUCT.md ├── README.md └── docs └── index.html /libs/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/hello.txt: -------------------------------------------------------------------------------- 1 | Hello World! -------------------------------------------------------------------------------- /example/routes.ini: -------------------------------------------------------------------------------- 1 | # Example configuration file 2 | 3 | ## Server 4 | server_url=http://localhost:8080/mgnt 5 | 6 | [modules] 7 | websocket.c 8 | counter.c 9 | todo.c 10 | json.c 11 | chat.c 12 | static.c 13 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | cweb: 5 | build: 6 | context: . 7 | dockerfile: Dockerfile 8 | restart: always 9 | ports: 10 | - "8080:8080" # Expose port 8080 11 | volumes: 12 | - ./modules:/app/modules 13 | -------------------------------------------------------------------------------- /example/deploy.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | 4 | :deploy_module 5 | set "code=%~1" 6 | set "server_url=http://localhost:8080/mgnt" 7 | 8 | echo Deploying "%code%" to "%server_url%"... 9 | 10 | REM Send the file with curl and capture the response 11 | curl -X POST "%server_url%" -F "code=@%code%" -------------------------------------------------------------------------------- /static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 |