Headless WordPress with React and NextJS
- Clone the repo locally.
- Search and replace
siteurl
fromwp.test
to the url of your desired site. - Run
npm install
. - Run
npm run build
for production build. - Run
npm run start
to see the changes as of now at http://localhost:8080. ( You can change port by updatingport
value in server.js ) - Use
npm run dev
while making changes / updates to the files.
- pages - Files inside this directory will be treated as pages.
- routes.js - You can define all the routes here.
- server.js - Contains server setup information.
Sample demo is built using this.