tildefriends/src/httpd.js.h
2024-03-05 12:47:58 -05:00

25 lines
660 B
C

#pragma once
/**
** \defgroup httpd_js HTTPD Interface
** Exposes the \ref http server to script and registers a number of built-in
** endpoints.
**
** core/core.js is gradually being moved from JS to C here, at which point this will
** no longer be a bridge between the two and instead primarily expose the web API.
**
** @{
*/
#include "quickjs.h"
/**
** Register the HTTP script interface. Also registers a number of built-in
** request handlers. An ongoing project is to move the JS request handlers
** into C, after which point this will only do the latter.
** @param context The JS context.
*/
void tf_httpd_register(JSContext* context);
/** @} */