Server Side Rendered / Code Split React + Wordpress REST API - built by Keen
- Node 10+
- WP CLI
- Node Foreman
- Composer
- yarn
- Install dependencies with
composer install
- Setup DB
composer run-script infoclinic-install
cp .env.example .env
and edit it- Find Wordpress salts here
cd client && cp .env.example .env
and edit it
- STAGE - development || production used for CORS setup
- DB_* - Wordpress DB settings
- Wordpress salt keys
- DEPLOY_* - setup for deployer
- FB_SERVER_KEY - Firebase key for Cloud messaging
- REACT_APP_API_URL - CMS URL to send API requests
- REACT_APP_FB_* - Firebase keys
- REACT_APP_GA - Google Analytics key
Start server with Node Foreman nf start
- Visit
http://localhost:8080
and login withadmin
andpassword
- Activate plugins and
rest-api
theme. - Add a new page called
Home
, set it to use theHome
page template, and then set it as your front page in theSettings -> Reading -> Your homepage displays
section - Change Permalinks to the 'Custom Structure' option and enter
/post/%postname%/
- Update your Site Address within
Settings -> General
to your SSR app (default: http://localhost:1337)