mirror of
https://github.com/sigmasternchen/CShore
synced 2025-03-15 16:18:56 +00:00
17 lines
276 B
C
17 lines
276 B
C
![]() |
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
#include "controller.h"
|
||
|
|
||
|
|
||
|
GET("/", hello);
|
||
|
GET("/index.*", hello);
|
||
|
response_t hello(ctx_t ctx) {
|
||
|
return rawResponse(200, "Hello World\n");
|
||
|
}
|
||
|
|
||
|
GET("/foobar", foobar);
|
||
|
response_t foobar(ctx_t ctx) {
|
||
|
return fileResponse("foobar.txt");
|
||
|
}
|