Added docker-compose file

This commit is contained in:
Nate Choe
2022-04-11 01:56:49 -05:00
parent 8914e57eec
commit 0a177b6d91
19 changed files with 34 additions and 27 deletions

17
site/library.c Normal file
View File

@@ -0,0 +1,17 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <swebs/swebs.h>
int getResponse(Request *request, Response *response) {
printf("%d\n", request->path.fieldCount);
for (int i = 0; i < request->path.fieldCount; i++)
printf("%s: %s\n", request->path.fields[i].var.data, request->path.fields[i].value.data);
char *str = request->path.path.data;
response->type = BUFFER;
response->response.buffer.data = malloc(100);
strcpy(response->response.buffer.data, str);
response->response.buffer.len = strlen(str);
return 200;
}