馃 An object-oriented Gemini server for Deno!
gemini-protocol
deno
typescript
gemini
1<h1 align="center">Laurali</h1>
2<p align="center"><b>An object-oriented Gemini server for Deno!</b></p>
3
4- Super simple
5- Object-oriented
6- Decorators!
7- Fun!
8
9## Usage
10
11The latest stable release of Laurali can be `import`ed from
12[deno.land/x](https://deno.land/x) using https://deno.land/x/laurali/mod.ts, or,
13you can `import` the latest bleeding-edge commit straight from GitHub using
14https://raw.githubusercontent.com/gemrest/laurali/main/mod.ts.
15
16## Documentation
17
18The latest documentation ([main](https://github.com/gemrest/laurali/tree/main))
19is available
20[here](https://doc.deno.land/https/raw.githubusercontent.com/gemrest/laurali/main/mod.ts),
21and the latest stable documentation is available
22[here](https://doc.deno.land/https/deno.land/x/laurali/mod.ts).
23
24## Example
25
26To create a simple Laurali server, you must first have a valid OpenSSL keypair.
27You can create a new OpenSSL keypair using the provided script by running
28
29```shell
30# Requires that you have both Deno and OpenSSL installed on your system
31
32$ deno run --allow-write --allow-run --allow-net --allow-read https://deno.land/x/laurali/key.ts # Optionally, `--overwrite`
33```
34
35You can then begin to implement your very own Laurali server.
36
37```ts
38import { route, Server } from "https://deno.land/x/laurali/mod.ts";
39
40class MyCoolServer extends Server {
41 /** Visit `/hi` */
42 @route()
43 hi() {
44 return "Hello, World!";
45 }
46}
47```
48
49After you have implemented your Laurali server, start listening for connections!
50
51```ts
52// `deno run --allow-net --allow-read https://deno.land/x/examples/my_cool_server.ts`
53
54(new MyCoolServer(".laurali/public.pem", ".laurali/private.pem")).listen();
55```
56
57More examples can be found in the [`examples/`](examples) directory.
58
59## License
60
61This project is licensed with the [GNU General Public License v3.0](LICENSE).