From 866ad278d5127bc25cdb47c0caf93317f39900a7 Mon Sep 17 00:00:00 2001 From: liuliu <44393673+liuliuOD@users.noreply.github.com> Date: Thu, 6 Apr 2023 18:11:44 +0800 Subject: [PATCH] doc: add README.md into cors/backend (#618) --- cors/README.md | 2 +- cors/backend/README.md | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 cors/backend/README.md diff --git a/cors/README.md b/cors/README.md index b50c02f9..1face3a3 100644 --- a/cors/README.md +++ b/cors/README.md @@ -1,6 +1,6 @@ # Cross-Origin Resource Sharing (CORS) -## Run Server +## [Run Server](backend/README.md) ```sh cd cors/backend diff --git a/cors/backend/README.md b/cors/backend/README.md new file mode 100644 index 00000000..865d8670 --- /dev/null +++ b/cors/backend/README.md @@ -0,0 +1,26 @@ +# actix_cors::Cors + +## Running Server + +```sh +cd cors/backend +cargo run +# starting HTTP server at http://localhost:8080 +``` + +### web client + +- [http://localhost:8080/user/info](http://localhost:8080/user/info) + ```json5 + // payload structure + { + "username": "username", + "email": "email", + "password": "password", + "confirm_password": "password" + } + ``` + +## Others + +- For more related examples of [actix_cors](https://docs.rs/actix-cors/latest/actix_cors/struct.Cors.html)