# Redux Installation

Pre-requisites

You need NodeJS and MongoDB installed for this tutorial. Download the latest version of NodeJS (recommended 6.3.1) from here: http://nodejs.org/

Download the latest version of MongoDB from here: https://www.mongodb.com/download-center?jmp=nav


For Windows users only:

If you are on Windows, you need to setup your system to be able to compile Node native modules. There are two options available:

  • Option 1 (recommended): Install all the required tools and configurations using Microsoft's windows-build-tools for compiling Node modules. To do that just run: npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

  • Option 2: Install tools and configuration manually:

    • Visual C++ Build Environment:

      • Option 1: Install Visual C++ Build Tools using the Default Install option.

      • Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.

    • Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7

    • Launch cmd, npm config set msvs_version 2015


Setup your project

Once you have Node and MongoDB setup, open a terminal/command prompt and change the current working directory to the redux directory in your downloaded Rubix folder like so (on Windows you would need to replace the backward slash "/" with the forward slash ""):

$ cd rubix/redux

As you can see, the redux directory has two sub-directories: A redux seed named redux-seed and a simple Todo list example app named redux-example.

We will be re-creating the redux-example app, which, you can use as a reference for this tutorial. Please clone the redux-seed directory and rename the new copy to redux-todolist. (The installation steps for redux-example is the same as below so we won't be repeating it here)

$ cp -rf redux-seed redux-todolist

Change the working directory to redux-todolist and install all the project dependencies:

$ cd redux-todolist
$ npm install

You may get some deprecation warnings as well as peerDependency warnings in your terminal while/after the NPM installation. Please ignore those warnings.

Once installation completes, run the following command to launch the server:

$ npm run dev -s

After the startup compilation finishes, you should get a message in your terminal saying "Node.js app is running at http://localhost:8080". Once you get the message, navigate to http://localhost:8080 in your browser.

A dashboard should render with a message saying: "received: Hello, World!".

With the installation complete click "Next" to start creating our Todo list app.