README.md
August 12, 2021 ยท View on GitHub
fluxcap
HackerNews UI built in Rust using the Official HackerNews API. The Name "FluxCap" comes from the Flux Capacitor used in "Back to the Future" as it has a "Y" shape.
Development
Docker
You must have Docker and Docker Compose installed in your system
-
Create a copy of
.env.sampleinto a fille name.env -
Execute
docker-compose -f ./docker-compose.dev.yml up --build -
Install the
sqlx-cliusing cargo. Follow the crate documentation -
Run database migrations
sqlx migrate run
When done, remember to teardown the Docker system by executing
docker-compose -f ./docker-compose.dev.yml down
Client
-
Install
trunkfollowing the official documentation. -
Install de Rust target for WASM using
rustup target add wasm32-unknown-unknown -
cdinto theclientdirectory and runtrunk serve
Server
-
Install
cargo watch, even if its not required is conveninent to have the project built on every file change in the project -
Run
cargo watch -x "run --package server" -
The website is available at http://0.0.0.0:3000
Deployment
Deployment is done in Heroku using the emk/heroku-buildpack-rust.