# Node Seed


You need NodeJS installed. Download the latest version of NodeJS (recommended 6.3.1 or above) from here: http://nodejs.org/

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 the Node Seed Project

Once you have NodeJS installed, open a terminal/command prompt and change the current working directory to the rubix/node-seed directory in your downloaded Rubix folder like so (on Windows you would need to replace the backward slash "/" with the forward slash ""):

$ cd rubix/node-seed

Then install all NPM dependencies:

$ 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 installed, launch the web server like so:

$ 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: "Hello, World!".

Understanding the file structure

All React source files are stored in src folder with the entrypoint being src/main.js. The routes are defined in src/routes.js. Plugins are defined in src/plugins.js. The Sidebar, Header and Footer reside in src/common. All pages are defined in src/routes.

SASS files are stored in sass with sass/main.scss file being the entrypoint.

Click here to learn more about Creating distributables.