Skip to content

Commit

Permalink
add production instructions, ease database setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Bechma committed Sep 24, 2023
1 parent 7f33738 commit a5568bd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 941 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ You need to have [rust](https://www.rust-lang.org/) installed.

```bash
export DATABASE_URL=DATABASE_URL=sqlite://./todosdb.sqlite
cargo install sqlx-cli
sqlx database create
sqlx migrate run
cargo run
```

Expand All @@ -33,3 +30,33 @@ npm run dev
cargo install cargo-watch
cargo watch -x run -w templates -w src -w assets
```

# Production

To have a production tailwind bundle

`npm run prod`

To have a production ready web server:

`cargo build --release`

You will need to keep the `assets` and `templates` folders relative to the binary generated:

```
.
├── assets
│   ├── css
│   │   └── main.css
│   ├── favicon.ico
│   └── js
│   ├── fontawesome.js
│   ├── htmx.org@1.9.5_dist_htmx.min.js
│   └── hyperscript.org@0.9.11_dist__hyperscript.min.js
├── templates
│   ├── components
│   │   └── todo.html
│   ├── index.html
│   └── input.css
└── todox
```
Loading

0 comments on commit a5568bd

Please sign in to comment.