Page Hotreloading

This commit is contained in:
kamkow1
2025-06-15 13:44:32 +02:00
parent bacc733fc3
commit 81460b1862
12 changed files with 140 additions and 8 deletions

6
main.c
View File

@ -2,9 +2,7 @@
#define GEBS_IMPLEMENTATION
#include "gebs/gebs.h"
#include "mongoose/mongoose.h"
#define STB_DS_IMPLEMENTATION
#include "stb/stb_ds.h"
@ -32,13 +30,15 @@ void event_handler(struct mg_connection *conn, int ev, void *ev_data)
}
}
static void init_route_hashtable(void)
void init_route_hashtable(void)
{
shdefault(route_hashtable, &route_page_not_found);
shput(route_hashtable, "/page-missing", &route_page_not_found);
shput(route_hashtable, "/simple.min.css", &route_simple_css);
shput(route_hashtable, "/favicon.ico", &route_favicon);
shput(route_hashtable, "/hotreload.js", &route_hotreload_js);
shput(route_hashtable, "/", &route_home);
shput(route_hashtable, "/build-id", &route_build_id);
}
int main(int argc, char ** argv)