Skip to content

moolric/WordExpress

Repository files navigation

Wordpress Express

This project is my attempt at using Node.js and Express to consume data from a Wordpress database using GraphQL and Relay and React and...other stuff.

It's built using Webpack, and requires Node V 5.0.0. You might be able to get away with 4.0, but really just tighten up and use 5.0.

You should also read about why I am doing this.

Major update to project

Inspired by this project and the evolving of react-transform and CSS Modules, this project has gotten a major upgrade.

Get Started

Just run npm install and then npm start

Connecting to a Wordpress Database

You'll notice a settings folder, which contains JSON files for development and production. This is where your wordpress database settings, as well as a wordpress table prefix, and uploads directory. Change accordingly.

React by default

The project runs with React by default and hot replacement of changes to the modules.

React CSS Modules

SASS files loaded into components are locally scoped and you can point to class names with javascript. You can also compose classes together, also from other files. These are also hot loaded. Read more about them here.

Babel and Linting

Both Node server and frontend code runs with Babel. And all of it is linted. With atom you install the linter package, then linter-eslint and linter-jscs. You are covered. Also run npm run eslint or npm run jscs to verify all files. I would recommend installing language-babel package too for syntax highlighting

Beautify

With a beautify package installed in your editor it will also do that

About

WordPress using Node, React, GraphQL, and Apollo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 69.6%
  • CSS 23.9%
  • HTML 6.5%