Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.2 KB

File metadata and controls

53 lines (36 loc) · 1.2 KB

Web Application Server - handlebars

git clone https://github.com/zzy/tide-async-graphql-mongodb.git
cd tide-async-graphql-mongodb
cargo build

cd frontend-handlebars

Rename file .env.example to .env, or put the environment variables into a .env file:

ADDRESS=127.0.0.1
PORT=3000

GRAPHQL_PORT=8000
GRAPHQL_PATH=graphql
GRAPHIQL_PATH=graphiql

Build & Run:

cargo run

Then connect to http://127.0.0.1:3000 with browser.

Client Image

How to Test & Run rhai scripts

You could use rhai-repl to test your rhai code, and use rhai-run to run it. rhai-repl.rs and rhai-run.rs are in the folder frontend-handlebars/scripts, please copy them into frontend-handlebars/examples folder, then test or run rhai code with command:

cargo run --example <rhai-repl>/<rhai-run ./scripts/script_to_run.rhai>

If you would want to install the rhai tool, use the command

cargo install --path . --example <rhai-repl>/<rhai-run>

then test rhai code using rhai-repl, and run scripts using the rhai-run:

rhai-run ./scripts/script_to_run.rhai

Contributing

You are welcome in contributing to this project.