/kasia-boilerplate

:tophat: A universal application boilerplate with Kasia

Primary LanguageJavaScriptMIT LicenseMIT

kasia-boilerplate

A universal application boilerplate with Kasia

Made with ❤ at @outlandish

npm version


An easy way to start building universal/isomorphic JavaScript applications that talk to a WordPress backend. Right on!

What's inside?

We used the react-redux-universal-hot-example boilerplate as our starting point, however lots has changed since then and the two are now quite different. Thanks go to the creator and maintainers of the aforementioned repo.

// Tools/libraries/features
Express, stage-0 ES2015, React, React Router, Redux, Kasia, 
Redux Sagas, Redux Dev Tools, SCSS, Webpack, Hot Reloading

Getting Started

Set up WordPress

We aim to release an Ansible script which will do all of this for you, but for now...

  • Install wordpress at localhost/wordpress (or somewhere else; change accordingly in src/config.js)
  • Install and enable these plugins: WP API REST JSON API v2, WP API MENUS
  • Create two pages with slugs homepage and posts
  • Create a menu (Appearance > Menus) called 'primary' containing the two pages you just created
  • Create some Posts

Get the application

  • Clone this repo: git clone <url> wp-app
  • Change into it: cd wp-app
  • Install dependencies: npm install
  • Configure the application in src/config.js

Start the app

As a developer:

  • npm run build
  • npm run dev

By default the web server is at localhost:3000

______

In production:

  • npm run build
  • npm start

By default the web server is at localhost:8080

Contributing

All pull requests and issues welcome!

  • When submitting an issue please provide adequate steps to reproduce the problem.
  • PRs must be made using the standard code style.

If you're not sure how to contribute, check out Kent C. Dodds' great video tutorials on egghead.io!

Author & License

kasia-boilerplate was created by Outlandish and is released under the MIT license.