File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 15
15
#include " index.html.hpp"
16
16
#include " index.js.hpp"
17
17
#include " completion.js.hpp"
18
+ #include " json-schema-to-grammar.mjs.hpp"
18
19
19
20
#ifndef SERVER_VERBOSE
20
21
#define SERVER_VERBOSE 1
@@ -1218,6 +1219,12 @@ int main(int argc, char **argv)
1218
1219
res.set_content (reinterpret_cast <const char *>(&completion_js), completion_js_len, " application/javascript" );
1219
1220
return false ; });
1220
1221
1222
+ // this is only called if no index.html is found in the public --path
1223
+ svr.Get (" /json-schema-to-grammar.mjs" , [](const Request &, Response &res)
1224
+ {
1225
+ res.set_content (reinterpret_cast <const char *>(&json_schema_to_grammar_mjs), json_schema_to_grammar_mjs_len, " application/javascript" );
1226
+ return false ; });
1227
+
1221
1228
svr.Post (" /completion" , [&llama](const Request &req, Response &res)
1222
1229
{
1223
1230
auto lock = llama.lock ();
You can’t perform that action at this time.
0 commit comments