Skip to content

codeitlikemiley/server_template

Repository files navigation

GRPC Server Generator

Build Template

Requirements

Note: Install the following before you can use the template generator.

Project Structure

workspace (root)
├── Cargo.toml
│
├── server <-- Generate Template this from **server_template**
│   └── .env.example
│   └── rust-toolchain.toml
│   └── Cargo.toml
│   └── README.md
│
├── frontend
│
└── services

Usage

Create a workspace

cd <workspace_root>
cargo workspaces init .

or you can simply create a Cargo.toml with this content

[workspace]
resolver = "2"
members = [
    server, # <- add this
   # add here services here after you generated it
]

Generate a new GRPC server template.

cargo generate --git codeitlikemiley/server_template --name server
cd server

Build , Testing and Documentation

cargo build
cargo test
cargo doc --open

Run Server

cargo run -p server

Adding services

To add more services please check this Services Template Repository

Pull Requests

If you need to make changes to the template, please submit a pull request.