moved to separate directories

This commit is contained in:
Michael Thomson 2024-02-13 07:46:43 -05:00
parent 6c3feb29c8
commit 9cb47c4c83
No known key found for this signature in database
6 changed files with 3 additions and 6 deletions

4
main.c
View File

@ -3,11 +3,11 @@
#include <stdlib.h>
char *home(struct Request request) {
return read_file("index.html");
return read_file("public/index.html");
}
char *clicked(struct Request request) {
return read_file("clicked.html");
return read_file("public/clicked.html");
}
int main(void) {

BIN
server

Binary file not shown.

View File

@ -143,10 +143,7 @@ char *read_file(char *filename) {
fclose(fp);
buffer[file_size] = '\0';
char *value = strdup(buffer);
free(buffer);
return value;
return buffer;
}
void respond(struct Server *server, int *client_fd) {