<commit_before>#include <stdio.h>
#include "../../build/libgohttp.h"

void handler(ResponseWriterPtr w, Request *req)
{
    printf("handler: %s %s\n", req->Method, req->URL);

    char *buf = "Hello, world";
    int n = ResponseWriter_Write(w, buf, 12);

    if (n == EOF) { 
        printf("handler: Failed to write.\n");
        ResponseWriter_WriteHeader(w, 500);
        return;
    }

    printf("handler: Wrote %d bytes.\n", n);
}

int main()
{
    HandleFunc("/hello", &handler);
    printf("Listening on :8000\n");<commit_msg>examples/c: Serve on / rather than /hello<commit_after>#include <stdio.h>
#include "../../build/libgohttp.h"

void handler(ResponseWriterPtr w, Request *req)
{
    printf("handler: %s %s\n", req->Method, req->URL);

    char *buf = "Hello, world";
    int n = ResponseWriter_Write(w, buf, 12);

    if (n == EOF) { 
        printf("handler: Failed to write.\n");
        ResponseWriter_WriteHeader(w, 500);
        return;
    }

    printf("handler: Wrote %d bytes.\n", n);
}

int main()
{
    HandleFunc("/", &handler);
    printf("Listening on :8000\n");
{'fraction_non_alphanumeric': 0.18331805682859761, 'fraction_numerical': 0.016498625114573784, 'mean_word_length': 2.9854014598540144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1729105', 'n_tokens_mistral': 398, 'n_tokens_neox': 367, 'n_words': 94}