2022-03-06 01:43:10 +01:00
|
|
|
# Cross-Origin Resource Sharing (CORS)
|
2018-04-13 03:18:42 +02:00
|
|
|
|
2020-10-20 00:36:53 +02:00
|
|
|
## Run Server
|
2022-03-06 01:43:10 +01:00
|
|
|
|
2020-10-20 00:36:53 +02:00
|
|
|
```sh
|
2022-02-18 03:18:44 +01:00
|
|
|
cd cors/backend
|
2020-10-20 00:36:53 +02:00
|
|
|
cargo run
|
2018-04-13 03:18:42 +02:00
|
|
|
```
|
2020-10-20 00:36:53 +02:00
|
|
|
|
|
|
|
## Run Frontend
|
2022-03-06 01:43:10 +01:00
|
|
|
|
2020-10-20 00:36:53 +02:00
|
|
|
In a separate terminal, also run:
|
2022-03-06 01:43:10 +01:00
|
|
|
|
2020-10-20 00:36:53 +02:00
|
|
|
```sh
|
2022-02-18 03:18:44 +01:00
|
|
|
cd cors/frontend
|
2020-10-20 00:36:53 +02:00
|
|
|
npm install
|
|
|
|
npm run serve
|
2018-04-13 03:18:42 +02:00
|
|
|
```
|
2022-03-06 01:43:10 +01:00
|
|
|
|
2020-10-20 00:36:53 +02:00
|
|
|
then open browser at: http://localhost:8080
|