https://github.com/djedou/cargo-duid-app
duid app is a cargo subcommand
https://github.com/djedou/cargo-duid-app
Last synced: 2 months ago
JSON representation
duid app is a cargo subcommand
- Host: GitHub
- URL: https://github.com/djedou/cargo-duid-app
- Owner: djedou
- Created: 2023-06-17T09:14:09.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-01T18:35:47.000Z (almost 2 years ago)
- Last Synced: 2025-01-29T04:26:29.889Z (4 months ago)
- Language: Rust
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cargo-duid-app
**duid-app** is a cargo subcommand# There are two ways to install cargo-duid-app
Method 1: [From Repository](https://github.com/djedou/cargo-duid-app#working-by-cloning-the-repository)
Method 2: [From Crates.io](https://github.com/djedou/cargo-duid-app#working-from-cratesio)# Working by cloning the repository.
First, clone this repository## Installation
```
cd cargo-duid-app
cargo install --path .
```
## Create project
```
cargo-duid-app init --name
```
## Develop your project
```
cd
cargo-duid-app dev
```## Run develop server
From another terminal
```
cargo-duid-app serve // default --host="0.0.0.0" --port=3000
```
or
```
cargo-duid-app serve --host --port
```## Build your project
```
cargo-duid-app build
```## Run production server
```
cargo-duid-app deploy // default --host="0.0.0.0" --port=3000
```
or
```
cargo-duid-app deploy --host --port
```# Working from crates.io
## Install
NB: Not yet on crates.io.
```
cargo install cargo-duid-app
```
## Create project
```
cargo duid-app init --name
```
## Develop your project
```
cd
cargo duid-app dev
```## Run develop server
From another terminal
```
cargo duid-app serve // default --host="0.0.0.0" --port=3000
```
or
```
cargo duid-app serve --host --port
```## Build your project
```
cargo duid-app build
```## Run production server
```
cargo duid-app deploy // default --host="0.0.0.0" --port=3000
```
or
```
cargo duid-app deploy --host --port
```# Structure:
The folder **./src/app** should have a file called **page.rs** which represents **/** the **root path** of your application.
Each folder in the directory **./src/app** represents a **path**.
Each folder in the directory **./src/app** should have the file called **page.rs**.
Each **page.rs** should look like this format
```
use wasm_bindgen::prelude::*;#[wasm_bindgen]
pub fn duid() {
// This is the entry point of this page.
// your code goes in this function
}
```