askrobots / dbbasic-web
Public
A Unix-style Python web framework: filesystem routing, flat files, messages and cron, with CGI's simplicity at modern speed.
Dan Quellhorst
Replace multipart parser with stdlib-only implementation
eb957a2
9 months, 2 weeks ago
History
index.html · 1.5 KB · 42 lines
| 1 | {% extends "base.html" %} |
| 2 | |
| 3 | {% block title %}Home - dbbasic-web{% endblock %} |
| 4 | |
| 5 | {% block content %} |
| 6 | <section> |
| 7 | <h2>Welcome to dbbasic-web</h2> |
| 8 | <p>A Unix-philosophy micro-framework with:</p> |
| 9 | <ul> |
| 10 | <li>Filesystem-based routing (no route tables)</li> |
| 11 | <li>TSV-based storage and job queues (no Redis/SQL required)</li> |
| 12 | <li>Built-in WebSockets and Server-Sent Events</li> |
| 13 | <li>Background jobs with dbbasic-queue</li> |
| 14 | <li>Message bus with dbbasic-pipe</li> |
| 15 | <li>Flat-file storage alongside databases</li> |
| 16 | </ul> |
| 17 | |
| 18 | <h3>Try it out:</h3> |
| 19 | <ul> |
| 20 | <li><a href="/hello?name=World">Simple API: /hello?name=World</a></li> |
| 21 | <li><a href="/user">REST API: /user</a></li> |
| 22 | <li><a href="/user/123">REST API: /user/123</a></li> |
| 23 | <li><a href="/user/123/posts">REST API: /user/123/posts</a></li> |
| 24 | <li><a href="/sse/counter">Server-Sent Events: /sse/counter</a></li> |
| 25 | </ul> |
| 26 | |
| 27 | <h3>WebSocket Test:</h3> |
| 28 | <div id="ws-test"> |
| 29 | <button onclick="connectWebSocket()">Connect WebSocket</button> |
| 30 | <button onclick="sendMessage()">Send Message</button> |
| 31 | <button onclick="disconnectWebSocket()">Disconnect</button> |
| 32 | <div id="ws-messages"></div> |
| 33 | </div> |
| 34 | |
| 35 | <h3>SSE Test:</h3> |
| 36 | <div id="sse-test"> |
| 37 | <button onclick="connectSSE()">Connect SSE</button> |
| 38 | <button onclick="disconnectSSE()">Disconnect</button> |
| 39 | <div id="sse-messages"></div> |
| 40 | </div> |
| 41 | </section> |
| 42 | {% endblock %} |