diff options
Diffstat (limited to 'assets/helloworld.c')
-rw-r--r-- | assets/helloworld.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/assets/helloworld.c b/assets/helloworld.c new file mode 100644 index 0000000..fcae386 --- /dev/null +++ b/assets/helloworld.c @@ -0,0 +1,16 @@ +#include <err.h> +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> + +int +main(void) +{ + if (-1 == pledge("stdio", NULL)) + err(EXIT_FAILURE, "pledge"); + puts("Status: 200 OK\r"); + puts("Content-Type: text/html\r"); + puts("\r"); + puts("Hello, world!\n"); + return(EXIT_SUCCESS); +} |