Code Monkey home page Code Monkey logo

node-with-wordpress-cms's Introduction

NodeJS pulling data from a WordPress CMS

Vagrant provisioning based on Varying Vagrant Vagrants.

Overview

This is just a starting proof of concept for provisioning WordPress and using a NodeJS server to parse slugs for content stored in the WordPress CMS.

Getting Started

The First Vagrant Up

  1. Start with any operating system.
  2. Install VirtualBox 4.2.x or VirtualBox 4.3.4
    • Major portions of VirtualBox were rewritten for 4.3, and it's possible that there are still bugs to be shaken out. VVV is completely compatible with earlier versions of VirtualBox, so 4.2.18 or earlier would be just fine. Do note that Vagrant had specific issues with 4.2.16. Going as far back as 4.2.10 will likely be of no issue.
    • VVV itself leans in the 4.3.x direction in the master branch to stay ahead of the curve.
  3. Install Vagrant 1.4.0
    • vagrant will now be available as a command in your terminal, try it out.
    • Note: If Vagrant is already installed, use vagrant -v to check the version. You may want to consider upgrading if a much older version is in use.
    • Note: If VirtualBox 4.3.x is installed, Vagrant 1.3.5 or later is required.
  4. Install the vagrant-hostsupdater plugin with vagrant plugin install vagrant-hostsupdater
    • Note: This step is not a requirement, though it does make the process of starting up a virtual machine nicer by automating the entries needed in your local machine's hosts file to access the provisioned VVV domains in your browser.
    • If you choose not to install this plugin, a manual entry should be added to your local hosts file that looks like this: 192.168.50.4 vvv.dev local.wordpress.dev local.wordpress-trunk.dev src.wordpress-develop.dev build.wordpress-develop.dev
  5. Clone or extract the project into a local directory
    • git clone git://github.com/jsarracco/node-with-wordpress-cms.git vagrant-local
  6. Change into the new directory with cd vagrant-local
  7. Start the Vagrant environment with vagrant up
    • Be patient as the magic happens. This could take a while on the first run as your local machine downloads the required files.
    • Watch as the script ends, as an administrator or su password may be required to properly modify the hosts file on your local machine.
  8. Visit any of the following default sites in your browser:

NodeJS

  1. The provision-post.sh file will add additional node modules and start the NodeJS Server, then you can go to:
  2. Sample posts can be viewed here:
  3. Log into http://local.wordpress.dev/ admin and add a page or a post, the same url should appear on the NodeJS Server.

Caveats

The network configuration picks an IP of 192.168.50.4. This works if you are not on the 192.168.50.x sub domain, it could cause conflicts on your existing network if you are on a 192.168.50.x sub domain already. You can configure any IP address in the Vagrantfile and it will be used on the next vagrant up

Credentials and Such

All database usernames and passwords for WordPress installations included by default are wp and wp.

All WordPress admin usernames and passwords for WordPress installations included by default are admin and password.

WordPress Stable

  • URL: http://local.wordpress.dev
  • DB Name: wordpress_default

WordPress Trunk

  • URL: http://local.wordpress-trunk.dev
  • DB Name: wordpress_trunk

WordPress Develop

  • /src URL: http://src.wordpress-develop.dev
  • /build URL: http://build.wordpress-develop.dev
  • DB Name: wordpress_develop
  • DB Name: wordpress_unit_tests

MySQL Root

What do you get?

A bunch of stuff!

  1. Ubuntu 12.04 LTS (Precise Pangolin)
  2. WordPress Develop
  3. WordPress Stable
  4. WordPress Trunk
  5. WP-CLI
  6. nginx 1.4.x
  7. mysql 5.5.x
  8. php-fpm 5.4.x
  9. memcached 1.4.13
  10. PHP memcache extension 3.0.8
  11. PHP xdebug extension 2.2.3
  12. PHP imagick extension 3.1.0RC2
  13. xdebug 2.2.3
  14. PHPUnit 3.7.24
  15. ack-grep 2.04
  16. git 1.8.5
  17. subversion 1.7.9
  18. ngrep
  19. dos2unix
  20. Composer
  21. phpMemcachedAdmin 1.2.2 BETA
  22. phpMyAdmin 4.0.10 (multi-language)
  23. Webgrind
  24. NodeJs Current Stable Version
  25. grunt-cli Current Stable Version

node-with-wordpress-cms's People

Contributors

aaronjorbin avatar andrezrv avatar cadwell avatar carldanley avatar cfoellmann avatar cmmarslender avatar danielbachhuber avatar ericandrewlewis avatar ericmann avatar imichaeli avatar jeremyfelt avatar johnpbloch avatar jsarracco avatar kadamwhite avatar lgedeon avatar mamaduka avatar markjaquith avatar mbijon avatar mboynes avatar mintindeed avatar ocean90 avatar selinerdominik avatar simonwheatley avatar sunnyratilal avatar tddewey avatar thelastcicada avatar tobiasbg avatar tollmanz avatar westi avatar westonruter 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.