Skip to content

Zack3155/journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Express Back-End with React Front-End

Server

  • Start SQL server and run "createdb journal -O labber"
  • Run "npm i"
  • Create .env file (Copy content from .env.example)
  • Run "npm run dev"
  • Open http://localhost:3001/

Client

  • Run "npm i"
  • Run "npm start"

Ports

  • React front-end is running on port 3000
  • Express back-end is running on port 3001 (or any other)

Cors

Cross-Origin Resource Sharing

  • A web application makes a cross-origin HTTP request when it requests a resource that has a different domain (i.e. different ports)
  • Web application using APIs can only request HTTP resources from the same origin the application was loaded from, unless the response from the other origin includes the right CORS headers.

References

Create React App with an Express Backend

Access-Control-Allow-Origin: Dealing with CORS Errors in React and Express

Deploy React and Express to Heroku

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published