https://github.com/libsql/hrana-test-server
Simple Hrana server for testing client libraries
https://github.com/libsql/hrana-test-server
Last synced: 3 months ago
JSON representation
Simple Hrana server for testing client libraries
- Host: GitHub
- URL: https://github.com/libsql/hrana-test-server
- Owner: libsql
- License: mit
- Created: 2023-03-27T08:13:41.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-06T10:52:03.000Z (almost 2 years ago)
- Last Synced: 2025-02-04T22:29:58.594Z (5 months ago)
- Language: Python
- Size: 110 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Test servers for Hrana
This repository contains simple Hrana servers implemented in Python, one for each version of the Hrana protocol. These servers are useful for testing our various Hrana libraries.
By default, the server creates a single temporary database for all HTTP requests and a new temporary database for every WebSocket connection, so multiple streams in the same WebSocket connection share the database, but are isolated from other WebSocket connections. However, if you pass environment variable `PERSISTENT_DB`, all HTTP requests and WebSocket connections will use that as the database file.
If you pass any arguments to the server, they will be interpreted as a command. After the server starts up, it spawns the command, waits for it to terminate, and returns its exit code.