Skip to content

HarshKapadia2/cors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CORS

A simple demo of a few scenarios that use Cross Origin Resource Sharing (CORS).

This is a part of my talk on CORS.

Usage

Client Setup

  • Serve client/index.html on port 3000 (http://localhost:3000).

Server Setup

  • In server run npm install to install all dependencies.
  • Run the server on port 5000 (http://localhost:5000) by running npm run start in the server directory.

Proxy Server Setup

  • In proxy-server run npm install to install all dependencies.
  • Run the server on port 8000 (http://localhost:8000) by running npm run start in the proxy-server directory.

Resources

About

A simple demo of a few scenarios that use CORS.

Topics

Resources

License

Stars

Watchers

Forks

Contributors