mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 15:15:10 +00:00
[ADD/WIP] Routerwerk!
This commit is contained in:
parent
25ed114d0f
commit
47c98cbbe3
8 changed files with 280 additions and 1 deletions
28
src/Main.c
28
src/Main.c
|
|
@ -1,9 +1,37 @@
|
|||
#include <Cytoplasm/HttpServer.h>
|
||||
#include <Cytoplasm/Log.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <Parsee.h>
|
||||
|
||||
int
|
||||
Main(void)
|
||||
{
|
||||
HttpServer *server = NULL;
|
||||
HttpServerConfig conf;
|
||||
ParseeData *data;
|
||||
const ParseeConfig *parseeConf;
|
||||
|
||||
Log(LOG_INFO, "%s - v%s", NAME, VERSION);
|
||||
ParseeConfigInit();
|
||||
ParseeExportConfigYAML(StreamStdout());
|
||||
|
||||
parseeConf = ParseeConfigGet();
|
||||
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
conf.port = parseeConf->port;
|
||||
conf.threads = 4;
|
||||
conf.maxConnections = 32;
|
||||
conf.handlerArgs = ParseeInitData();
|
||||
conf.handler = ParseeRequest;
|
||||
|
||||
/* TODO: The rest of Parsee. */
|
||||
server = HttpServerCreate(&conf);
|
||||
HttpServerStart(server);
|
||||
HttpServerJoin(server);
|
||||
|
||||
HttpServerFree(server);
|
||||
ParseeConfigFree();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue