• Stars
    star
    374
  • Rank 114,346 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example on using create-react-app with a Node Express Backend

create-react-app React Project with Node Express Backend

Example on using create-react-app with a Node Express Backend

Usage

Install nodemon globally

npm i nodemon -g

Install server and client dependencies

yarn
cd client
yarn

To start the server and client at the same time (from the root of the project)

yarn dev

Running the production build on localhost. This will create a production build, then Node will serve the app on http://localhost:5000

NODE_ENV=production yarn dev:server

How this works

The key to use an Express backend with a project created with create-react-app is on using a proxy. We have a proxy entry in client/package.json

"proxy": "http://localhost:5000/"

This tells Webpack development server to proxy our API requests to our API server, given that our Express server is running on localhost:5000

Tutorial

Visit my blog post entry for a detailed step-by-step guide.

Deployed app

Giving Back

If you would like to support my work and the time I put into making tutorials, consider getting me a coffee by clicking on the image below. I would really appreciate it!

Buy Me A Coffee

-Esau

More Repositories

1

react-starter-boilerplate-hmr

React starter boilerplate with React Fast Refresh, React 17 and Webpack 5
JavaScript
185
star
2

react-production-deployment

Deploy your React app to production on Netlify, Vercel and Heroku
JavaScript
52
star
3

live-reload-vanilla-website-template

Template to build a website without a front-end framework, including transpilation of ES6+ JavaScript and Sass support
JavaScript
51
star
4

jquery.selectlistactions.js

jQuery.SelectListActions plugin allows you to perform several actions with HTML Select lists
HTML
35
star
5

fullcalendar-aspnet-core

Implementation of FullCalendar in ASP.NET Core
JavaScript
33
star
6

ASP.Net-EventCalendar

JQuery FullCalendar implementation in ASP.NET
C#
33
star
7

jekyll-gulp-boilerplate

A boilerplate project including full setup for Jekyll, GulpJS, SASS, PostCSS, BrowserSync, Autoprefixer and deploy to GitHub Pages using Gulp
HTML
15
star
8

react-firebase-oauth

React app to showcase OAuth Authentication with GitHub, Twitter and Facebook using Firebase
JavaScript
13
star
9

vuejs-aspnet-core

Getting Started with VueJS in .NET Core
JavaScript
12
star
10

quick-node-server

Quickly Set Up a Node ExpressJS Server to Serve a Static Site
HTML
11
star
11

live-markdown-editor

GitHub flavored markdown editor built with React.js
JavaScript
10
star
12

dotnet-core-mvc-react

Repository for a tutorial on how to add React to a .NET Core MVC App
JavaScript
8
star
13

weddingrsvp

Simple Wedding RSVP Rails Application
Ruby
6
star
14

esausilva-dev

My personal protfolio website written in GatsbyJS
JavaScript
3
star
15

andrea-silva-design

Andrea Silva Design
JavaScript
2
star
16

character-word-sentence-paragraph-counter

Counts characters, words, sentences and paragraphs in a given text, written in Vanilla JavaScript (ES6+) and React
JavaScript
2
star
17

netcore-sass-webpack

Compile Sass files in Visual Studio and Webpack
HTML
2
star
18

profile-updater

A React App to Update Your Social Medial Profiles: Twitter, GitHub & Facebook
JavaScript
1
star
19

andreasilva

Andrea Silva Portfolio
CSS
1
star
20

bulkgetter

bulkGetter is a script wrapped around 'wget' that functions as a command line download manager tool
Shell
1
star
21

hot-chocolate-graphql-workshop-updated

In this repo you will find the final working version of the workshop using Hot Chocolate v13.x and .NET 7
C#
1
star
22

process-videos-synology

Transcode HVEC to H.264 video files for Synology Photos and fix timestamps
Shell
1
star