Skip to content

Commit

Permalink
docs: add dev server basic information
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Jul 1, 2023
1 parent 5291304 commit 75d5c04
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/pages/04-dev-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Development Server

The tool comes with it's own dev server (since v0.2.4), and can be used to run a
simple file server for the output folder.

It's as simple as running the following command

```sh
$ alvu --serve
# short for
$ alvu --serve --port=3000
```

## Live Reload

<small>Added in `v0.2.9`</small>

There's no changes that you need to do, just upgrade your installation to
`v0.2.9`

#### What's to be expected

- Will reload on changes from the directories `pages`, `public` , or if you
changed them with flags then the respective paths will be watched instead

- The rebuilding process is atomic and will recompile a singular file if that's
all that's changed instead of compiling the whole folder. This is only true
for files in the `pages` directory, if any changes were made in `public`
directory then the whole alvu setup will rebuild itself again.

#### Caveats

- `./hooks` are not watched, this is because hooks have their own state and
involve a VM, the current structure of alvu stops us from doing this but
should be done soon without increasing complexity or size of alvu itself.

0 comments on commit 75d5c04

Please sign in to comment.