https://github.com/thesurlydev/api-cli-lib-template
A cargo-generate template for creating a Rust library, CLI, and an API server
https://github.com/thesurlydev/api-cli-lib-template
cargo-generate rust
Last synced: about 1 year ago
JSON representation
A cargo-generate template for creating a Rust library, CLI, and an API server
- Host: GitHub
- URL: https://github.com/thesurlydev/api-cli-lib-template
- Owner: thesurlydev
- License: apache-2.0
- Created: 2022-09-11T19:43:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-06T16:08:03.000Z (over 2 years ago)
- Last Synced: 2025-02-06T18:52:28.856Z (over 1 year ago)
- Topics: cargo-generate, rust
- Language: Rust
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# {{project-name}}
{{description}}
## Generator usage
This project was generated via the `cargo-generate` tool and `cargo-generate-all` template.
For example,
```bash
cargo generate digitalsanctum/cargo-generate-all --name foo -d github_user=digitalsanctum -d description="Some description here"
```
## Build
```bash
cargo clean && cargo build --release
```
## Package
Create a Docker image with the binary:
```bash
docker build -t {{project-name}}-api .
```
## Run
Via binary:
```bash
cargo run
```
Via Docker:
```bash
docker run -d -p 8080:8080 --name {{project-name}}-api {{project-name}}-api
```