A simple demo of a few scenarios that use Cross Origin Resource Sharing (CORS).
This is a part of my talk on CORS.
- Serve
client/index.htmlon port 3000 (http://localhost:3000).- The
servepackage can be used.
- The
- In
serverrunnpm installto install all dependencies. - Run the server on port 5000 (
http://localhost:5000) by runningnpm run startin theserverdirectory.
- In
proxy-serverrunnpm installto install all dependencies. - Run the server on port 8000 (
http://localhost:8000) by runningnpm run startin theproxy-serverdirectory.
- My talk on CORS: talks.harshkapadia.me/cors
- My resources: dev.harshkapadia.me/resources#cors