Crates.io | hermodapi |
lib.rs | hermodapi |
version | 0.1.0 |
source | src |
created_at | 2021-09-26 23:57:50.303335 |
updated_at | 2021-09-26 23:57:50.303335 |
description | Hermod is a platform for automated business-customer interactions. |
homepage | https://hermodapp.com |
repository | https://github.com/hermodapp/api |
max_upload_size | |
id | 456721 |
size | 120,744 |
The Hermod project is currently a monorepo split into two projects - api and www.
Api contains a Rust server application executable that serves as our project's backend.
Www contains a React webserver that serves as our project's frontend.
Spec.yaml contains Digital Ocean Application specifications for our project's deployment.
cd api
# Install Rust, psql, and Docker
brew install rustup postgres # Install Rustup and psql command line tool
brew cask install docker # Install Docker
# Build and run application
./scripts/init_db.sh # Starts and migrates a Postgres database using Docker
cargo +nightly run # Compiles and runs the Hermod project using an edge Rust build (aka cargo r)
Additional commands useful for developing in the api project are located in the api folder's README
For instructions to run the project, look at the repo-level README.
To view the project's auto-generated documentation, run cargo doc --open
locally, or view
the latest version online.
# Install optional Rust command-line utilities
cargo install sqlx-cli # (Optionally) Install sqlx CLI
cargo install bunyan # (Optionally) install Bunyan log formatter
# Other useful commands
cargo doc --open # Compiles and opens project documentation (aka cargo d)
cargo test # Runs unit and integration tests (aka cargo t)
cargo r | bunyan # Compiles and runs the project, piping log output to the Bunyan formatter
TEST_LOG=true cargo t | bunyan # Runs tests with logging, piping output to Bunyan
./scripts/stop_db.sh # Stops the PostgresDB Docker container
sqlx mig add YOUR_MIGRATION_NAME # Create a new sqlx migration
sqlx mig run # Run your new migration
cargo sqlx prepare -- --bin hermod # Rebuild sqlx's cache used for compile-time SQL guarantees
docker build -t hermod_api . # Build the release image of the application (will take a *very* long time, Rust has infamously long release compilation times)
docker run -p 8000:8000 hermod_api # Run the release image of the application