Skip to content

merin83/isomorphic-cra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was bootstrapped with Create React App and Cra-Universal.

Development

i) yarn (run the below command in seperate window at the root directory)
ii) yarn start 
iii) yarn cra-universal start

Production

# Change directory to your project root first, and run:
yarn cra-universal build

# This command will build both client and server and put them into `./dist`

Deployment

First, follow the Production guide mentioned above.
Since the bundle used Webpack Node Externals, you need to run npm install --production on the copied /dist, but this time you don't need to install its devDependencies
Use process manager like PM2 to run your server, your run target is ./dist/server/bundle.js