Skip to content

Commit

Permalink
add nanovm quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
radiosilence committed Mar 15, 2024
1 parent e841fc0 commit 732ac3c
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Hyper-minimal low-latency webserver for serving SPAs and static content based on
- `SPA_MODE` when set to `1` 404 request will return `/public/index.html` as a `200`.
- `CONFIG_PREFIX` will set the prefix to scan environment variables in order to enable runtime config. Defaults to `VITE_`

# Example Dockerfile
# Docker Quick Start

```Dockerfile

Expand Down Expand Up @@ -59,3 +59,24 @@ try {
```

In this way, you can reference these variables that can be set when the container is spun-up.

# NanoVM/OPS Quick Start

You'll want a `config.json` for your project that looks something like this:

```json
{
"Dirs": ["public"],
"Env": {
"SPA_MODE": "1"
}
}
```

Make sure your public files are in a `./public` directory relative to CWD.

Then you can run this command to build your image:

```
ops image create -c config.json --package radiosilence/nano-web:latest -i my-website
```

0 comments on commit 732ac3c

Please sign in to comment.