Git Product home page Git Product logo

infoclinic's Introduction

Based on

Server Side Rendered / Code Split React + Wordpress REST API - built by Keen

Global requirements

  • Node 10+
  • WP CLI
  • Node Foreman
  • Composer
  • yarn

Initial setup

Install dependencies & Wordpress setup

  1. Install dependencies with composer install
  2. Setup DB composer run-script infoclinic-install

Setup env

  1. cp .env.example .env and edit it
  2. Find Wordpress salts here
  3. cd client && cp .env.example .env and edit it

env Explanation

Root
  1. STAGE - development || production used for CORS setup
  2. DB_* - Wordpress DB settings
  3. Wordpress salt keys
  4. DEPLOY_* - setup for deployer
  5. FB_SERVER_KEY - Firebase key for Cloud messaging
Client
  1. REACT_APP_API_URL - CMS URL to send API requests
  2. REACT_APP_FB_* - Firebase keys
  3. REACT_APP_GA - Google Analytics key

Run server

Start server with Node Foreman nf start

Wordpress setup

  1. Visit http://localhost:8080 and login with admin and password
  2. Activate plugins and rest-api theme.
  3. Add a new page called Home, set it to use the Home page template, and then set it as your front page in the Settings -> Reading -> Your homepage displays section
  4. Change Permalinks to the 'Custom Structure' option and enter /post/%postname%/
  5. Update your Site Address within Settings -> General to your SSR app (default: http://localhost:1337)

infoclinic's People

Contributors

dependabot[bot] avatar drtechie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.