diff --git a/web-cors/README.md b/web-cors/README.md index 6dd3d77f..cff3c1d0 100644 --- a/web-cors/README.md +++ b/web-cors/README.md @@ -10,6 +10,6 @@ $ cargo run ```bash $ cd web-cors/frontend $ npm install -$ npm run dev +$ npm run serve ``` -then open browser 'http://localhost:1234/' +then open browser 'http://localhost:8080' diff --git a/web-cors/backend/src/main.rs b/web-cors/backend/src/main.rs index 5d951e03..c009db8e 100644 --- a/web-cors/backend/src/main.rs +++ b/web-cors/backend/src/main.rs @@ -15,7 +15,7 @@ fn main() -> std::io::Result<()> { App::new() .wrap( Cors::new() - .allowed_origin("http://localhost:1234") + .allowed_origin("http://localhost:8080") .allowed_methods(vec!["GET", "POST"]) .allowed_headers(vec![header::AUTHORIZATION, header::ACCEPT]) .allowed_header(header::CONTENT_TYPE) diff --git a/web-cors/frontend/.babelrc b/web-cors/frontend/.babelrc deleted file mode 100644 index 002b4aa0..00000000 --- a/web-cors/frontend/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["env"] -} diff --git a/web-cors/frontend/.gitignore b/web-cors/frontend/.gitignore index 8875af86..765645ee 100644 --- a/web-cors/frontend/.gitignore +++ b/web-cors/frontend/.gitignore @@ -5,6 +5,7 @@ node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* +package-lock.json # Editor directories and files .idea diff --git a/web-cors/frontend/index.html b/web-cors/frontend/index.html index d71de81c..483dec27 100644 --- a/web-cors/frontend/index.html +++ b/web-cors/frontend/index.html @@ -6,8 +6,6 @@