Express middleware for React/Redux applications
Express middleware for React/Redux applications
For beginners, building a development environment for a React/Redux app is a time-consuming task, while they want to start to coding an app. To this end, there are various packages that support building React/Redux apps. However, I wasn't able to find one that fulfills my requirements:
Hence, I decided to create yet another pakcage for the same purpose. This package is express middleware with the assumption that server logic is implemented in express and express provides APIs to the client app. Let's call it an Express/React/Redux app.
This is simple express middleware that comes with a default opinionated webpack config. It provides some functionalities by default:
create an app folder:
mkdir sample-app
cd sample-app
npm init
install packages:
npm install express express-react-redux --save
import a template app:
$(npm bin)/express-react-redux import tiny-todos
run a dev server:
PORT=3000 npm start
build and run a production server:
npm run build
PORT=3000 NODE_ENV=production npm start