An open API service indexing awesome lists of open source software.

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

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
}
```