Garden is a Framework in C to develop web applications
Garden is a Framework in C to develop web applications.
Download Garden-Framework using:
git clone https://github.com/brumazzi/Garden-Framework.git garden
cd garden
./configure
make
sudo make install
To init garden server use garden -server
, can be change server settings, (port, threads, synchronized) using garden -server -port 8080 -threads 6 -sync
.
-server start garden server
-port
-threads
-sync use synchronized threads
Views are shared libraries views.so
.
Garden call automatically the views by url.
#include <web-header.h>
void _(http_header *hh, int(*resp)(http_header *, const char*)){
resp(hh, "<!doctype html><html><body><h1>Hello</h1></body></html>");
} // send string to client browser when acess '/'
void _wellcome(http_header *hh, int(*resp)(http_header *, const char*)){
resp(hh, "Well Come!");
} // send Well Come when acess /wellcome