generated from alecodes/base-template
Compare commits
2 commits
a8f18680c8
...
8e1e366964
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e1e366964 | |||
| 56a9c7bd40 |
4 changed files with 4 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ docker-compose +ARGS:
|
||||||
start-dev-services: (docker-compose "up --remove-orphans")
|
start-dev-services: (docker-compose "up --remove-orphans")
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
watchexec --restart --clear --watch src --watch dist cargo run
|
watchexec --no-vcs-ignore --clear --restart --watch=dist --watch=src cargo run
|
||||||
|
|
||||||
migrate: (docker-compose "run dbmate migrate")
|
migrate: (docker-compose "run dbmate migrate")
|
||||||
|
|
||||||
|
|
|
||||||
2
build.rs
2
build.rs
|
|
@ -1,5 +1,5 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
// only enable in production build
|
// only enable in production build
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
minijinja_embed::embed_templates!("templates");
|
minijinja_embed::embed_templates!("dist");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
<button class="msp-btn-sm" hx-get="/" hx-target="#example-table">Refresh</button>
|
<button class="msp-btn-sm" hx-get="/" hx-target="#example-table">Refresh</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h1>Axum example! 1</h1>
|
||||||
|
|
||||||
{% block htmx %}
|
{% block htmx %}
|
||||||
<table id="example-table">
|
<table id="example-table">
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ fn load_templates() -> Result<Environment<'static>> {
|
||||||
|
|
||||||
// only enable in production build
|
// only enable in production build
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
minijinja_embed::load_templates!(&mut env);
|
minijinja_embed::load_templates!(&mut tmpl_env);
|
||||||
|
|
||||||
let global_routes = vec![Link {
|
let global_routes = vec![Link {
|
||||||
path: "/about".to_owned(),
|
path: "/about".to_owned(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue