2022-03-06 00:43:10 +00:00
|
|
|
# Cross-Origin Resource Sharing (CORS)
|
2018-04-13 09:18:42 +08:00
|
|
|
|
2023-04-06 18:11:44 +08:00
|
|
|
## [Run Server](backend/README.md)
|
2022-03-06 00:43:10 +00:00
|
|
|
|
2020-10-19 23:36:53 +01:00
|
|
|
```sh
|
2022-02-18 02:18:44 +00:00
|
|
|
cd cors/backend
|
2020-10-19 23:36:53 +01:00
|
|
|
cargo run
|
2018-04-13 09:18:42 +08:00
|
|
|
```
|
2020-10-19 23:36:53 +01:00
|
|
|
|
|
|
|
## Run Frontend
|
2022-03-06 00:43:10 +00:00
|
|
|
|
2020-10-19 23:36:53 +01:00
|
|
|
In a separate terminal, also run:
|
2022-03-06 00:43:10 +00:00
|
|
|
|
2020-10-19 23:36:53 +01:00
|
|
|
```sh
|
2022-02-18 02:18:44 +00:00
|
|
|
cd cors/frontend
|
2020-10-19 23:36:53 +01:00
|
|
|
npm install
|
2023-07-18 22:54:35 +01:00
|
|
|
npm run dev
|
2018-04-13 09:18:42 +08:00
|
|
|
```
|
2022-03-06 00:43:10 +00:00
|
|
|
|
2020-10-19 23:36:53 +01:00
|
|
|
then open browser at: http://localhost:8080
|