Skip to content

Commit

Permalink
docs: Add initial documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dkolba committed Apr 30, 2023
1 parent b1143c5 commit 042ef4f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
# LEBERTRAN

Extends the deno file_server from std with live reload via websocket.
Extends the deno `file_server` from `std` with live reload via websocket.

## INSTALL

deno install --allow-net --allow-read lebertran.ts
Install `lebertran` from this repo as a command-line tool:

deno install --allow-net --allow-read --import-map=deno.jsonc ./lebertran.ts

## RUN

In plain HTTP/WS mode:

lebertran someFolderOnYourComputer

In secure HTTPS mode you will need to pass a certificate and key file:

lebertran -c localhost.crt -k localhost.key someFolderOnYourComputer",

## DEVELOPMENT

deno run --allow-net --allow-read --watch lebertran.ts someFolderOnYourComputer
For local development `lebertran` will need localhost certificates (`openssl` needs to be installed):

deno task certs

Then `lebertran` can be started in secure mode (HTTPS and WSS enabled) mode with automatic reloading. The contents of the `www` folder in the root directory will be used :

deno task dev
1 change: 0 additions & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"tasks": {
"start": "deno run --allow-read --allow-net lebertran.ts -k localhost.key -c localhost.crt www",
"dev": "deno run --watch --allow-read --allow-net lebertran.ts -k localhost.key -c localhost.crt www",
"certs": "openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -subj '/CN=localhost' -keyout localhost.key -out localhost.crt"
},
Expand Down

0 comments on commit 042ef4f

Please sign in to comment.