Skip to content

tideでhtmlファイルを表示するサンプルコード / A sample project that make enable to display html file on browser using tide.

License

Notifications You must be signed in to change notification settings

yusuke-ota/tide_html_server_sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tide_html_server_sample

dependencies

[dependencies]
tide = "0.15"
tinytemplate = "1.1"
serde = "1.0"

[dependencies.async-std]
version = "1.6"
features = ["attributes"]

what is this?

(jp)
tideを使ってhtmlファイルとしてResponseを作成するサンプル
(en)
Sample that make response as html file using tide.

how to use

  1. リポジトリのクローン / Clone this repository
git clone https://github.com/yusuke-ota/tide_html_server_sample.git
  1. 実行 / cargo run
cd tide_html_server_sample
cargo run
  1. サーバにアクセス / Access to this html server
# return string "hello"
curl http://localhost:8080/

# return static html file
curl http://localhost:8080/hello_html

# return html file generated by template engin
curl http://localhost:8080/html_template/[string]

# return static html file notice not found
curl http://localhost:8080/something

About

tideでhtmlファイルを表示するサンプルコード / A sample project that make enable to display html file on browser using tide.

Topics

Resources

License

Stars

Watchers

Forks