CLI
Init
cra-universal init
It will copy ./templates/server
into the current directory (it should be run on CRA client root)
Start
cra-universal start
This will start CRA server for development. You can also run both client and server by running:
cra-universal start --both
Build
cra-universal build
This will run npm run build
on both CRA client and server and then combine them into ./dist
folder. Make sure your build
npm script is still there
Clean
cra-universal clean
This command will clean the build result generated by the CLI (dist, build, server-build)