{{project-name | capitalize}}
{{project-name}} is ...
Features
Installation
Using cargo (for development)
cargo make run
Manual
- Get the code
git clone https://github.com/{{gh-username}}/{{project-name}}
- Build api and web release assets
cargo make build-release
It will produce a target/release/{{project-name}}-api backend binary and frontend assets in the web/dist directory.
- Deploy assets
mkdir -p $DEPLOY_DIR/config
cp -a target/release/{{project-name}}-api $DEPLOY_DIR
cp -a web/dist/* $DEPLOY_DIR
cp -a api/config/{default.toml, prod.toml} $DEPLOY_DIR/config
- Run server
cd $DEPLOY_DIR
env CONFIG_FILE=$DEPLOY_DIR/config/prod.toml ./{{project-name}}-api
Using Docker
Build Docker image
docker build -t {{project-name}} .
Run {{project-name | capitalize}} using Docker
docker run --rm -ti -p 8000:8000 project-name
Usage
Access {{project-name | capitalize}} using http://localhost:8000