An basic actix web starter repository.
An actix-web application, with CLI interface to configure host and port. Includes a rough app structure that separates tests from app code inspired by zero-to-prod
- Actix web
- lexopt for CLI interface
- Askama for Jinja-like templating
- Thirtyfour for browser end-to-end tests
- GitHub actions that depend on https://github.com/dtolnay/rust-toolchain
To use this repository you will need:
- Rust
To run locally:
-
Run cargo
cargo run
Visit http://127.0.0.1:8080 to view the app.
Optionally run on a different port
cargo run -- -p 5000
View other CLI options with:
cargo run -- --help Usage: actix_starter [-h|--host=X.X.X.X] [-p|--port=XXXX]
If you have Docker installed you can build the app with the following commands:
-
Build the image
docker build . -t actix_starter
-
Run the image
docker run --rm -p 8080:8080 actix_starter:latest
To run the full test suite you will need to install and start geckodriver. An example script for downloading geckodriver for MacOS is included in drivers.
-
Start geckodriver in the background
geckodriver &
-
To run the tests:
cargo test