|
myTinySQL v0.2.0-2-g5000098
A tiny SQL interpreter over fixed-width text files
|
The small HTTP server behind --http: the page and its JSON API.
More...
#include <cstdint>#include <filesystem>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | tinysql::ServerConfig |
| Settings of the browser server. More... | |
Functions | |
| void | tinysql::runServer (const ServerConfig &config) |
| Serves connections until the process is stopped. | |
The small HTTP server behind --http: the page and its JSON API.
Definition in file Server.hpp.
| void tinysql::runServer | ( | const ServerConfig & | config | ) |
Serves connections until the process is stopped.
It serves the page's files from ServerConfig::webDir and a small JSON API: GET /api/tables lists the tables, POST /api/sql runs the SQL in the request body. Each connection is served in its own thread; the SQL itself runs one request at a time.
| config | The server settings. |
| std::system_error | If the port cannot be opened (for example, it is already in use). |
Definition at line 312 of file Server.cpp.