Skip to content

NathanKr/express-and-react-simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Introduction

Simple setup for express as backend and react as frontend

Project structure

  • server resides under server directory
  • react app reside under server directory inside client directory which created using create-react-app

Two servers for development

  • Express server listens locally on port 5000
  • React development server listens locally on port 3000
  • use npm run dev from server directory to run express and react
  • concurrently package is used to run both servers. install on server directory !
  • This setup will work ONLY if you add "proxy": "http://localhost:5000" to package.json of the create-react-app project

Scripts of package.json inside server directory

Name Description Invoke from server directory
start start express server using node npm start
server start express server using nodemon npm run server
client start react server npm run client
dev run server and client using the package concurrently npm run dev

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published