Skip to content

Commit

Permalink
feat: Add watch server for frontend
Browse files Browse the repository at this point in the history
This uses the `notify` crate to watch for changes in the `web` project's
files. Currently there is no effect that happens other than a print
about which events have fired. Some form of debouncing would be
beneficial in addition to effects that happen as a result of changing.
  • Loading branch information
justinrubek committed Jun 18, 2023
1 parent 60c20c9 commit 7b0c915
Show file tree
Hide file tree
Showing 5 changed files with 269 additions and 6 deletions.
196 changes: 190 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ reqwest = { version = "0.11.14", default-features = false, features = ["rustls-t
tokio.workspace = true
tracing.workspace = true
http-body = "0.4.5"
notify = "5.1.0"
futures = "0.3.27"
# tokio = { version = "1", features = ["full"] }
5 changes: 5 additions & 0 deletions crates/cli/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
pub(crate) mod dev;
pub(crate) mod server;

use dev::DevCommand;
use server::ServerCommand;

#[derive(clap::Parser, Debug)]
Expand All @@ -13,6 +16,8 @@ pub(crate) enum Commands {
Command(Command),
/// commands for running the server
Server(ServerCommand),
/// commands to use during development
Dev(DevCommand),
}

#[derive(clap::Args, Debug)]
Expand Down
Loading

0 comments on commit 7b0c915

Please sign in to comment.