feature: html with SSI

This commit is contained in:
Andy Burke 2025-06-30 15:21:07 -07:00
parent d917b69753
commit 0f65e57539
10 changed files with 210 additions and 27 deletions

View file

@ -9,21 +9,20 @@ bit more like old-school CGI.
Compiled:
```
<insert instructions for using compiled command line>
[user@machine] ~/ serverus --root ./public
```
Container:
```
<insert instructions for using a container>
<our container can and should be very simple: mount a /www into the container and we run the compiled command line to serve it>
<our container can and should be very simple: mount a /www into the container and we run serverus on it>
```
Deno:
```
<something like this? can you just run the command directly like this?>
deno run jsr:@andyburke/serverus
deno --allow-env --allow-read --allow-write --allow-net jsr:@andyburke/serverus --root ./public
```
## Overview
@ -33,8 +32,8 @@ different types of content with a great deal of control.
The default handlers are:
- static files
will serve up static files within the root folder
- HTML with SSI support
eg: <html><body><!-- #include file="./body.html" --></body></html>
- markdown
will serve markdown as HTML (or raw with an Accept header of text/markdown)
- Typescript
@ -42,6 +41,8 @@ The default handlers are:
eg: ./book/:book_id/index.ts) and if they export methods like `GET` and `POST`,
they will be called for those requests. there's some additional stuff you can
export to ease typical use cases, covered below.
- static files
will serve up static files within the root folder
You just start serverus in a directory (or specify a root) and it tells you where it's
listening.