I recommend that you set up your cmd.exe to be able to use node commands – if you choose not to, I
believe that is fine. First, you might as well try
node --version
in command prompt, to see if it is already set up or not. If so, skip this part. If not, continue.
To do it, you'll want to go to My Computer > Properties > Advanced System Settings. From there, go to Environment Variables as shown below. Select 'PATH' and hit Edit.
'PATH' might not be there, I don't remember from when I tried to set up my dev environment on windows (I decided to install Ubuntu in dual boot and set up there instead; you will see why later). If not, then create it. Find where node.js is installed - probably one directory in Program Files, and another in %appdata%. Set 'PATH' to point to them; it should look similar to this:
C:\Program Files\nodejs;C:\Users\Jeanyves\AppData\Roaming\npm
Now, open command prompt and type
node --version
to make sure that node is working correctly. It should tell you what version of node you are running. If instead it says "'node' is not recognized as an internal or external command, operable program or batch file." then something went wrong while setting up the PATH.
Okay, so that is done (or you skipped it, alternatively). Now, you will need to set up the database. If you haven't already, install PostgreSQL. Once installed, launch PGAdmin III. Right click on 'Login Roles' and create a new role. Username and password (set password in 'Definitions' tab) don't matter, just remember what they are. After the role has been made, right click on 'Databases' and create a new database called 'guild'.
Make sure the owner is the user you just made. Now comes the fun part.
The guild uses the 'plv8' extension for PostgreSQL. For reasons unknown to us, this isn't included in the Windows version of PostgreSQL. I don't remember to what degree the site runs without it - I'd like to say that latest post, topic count, etc don't work, but the site itself does, but don't quote me on that - but if you are comfortable doing so, it is strongly recommended that you download the source code for the version of plv8 corresponding to your version of postgres, and compile the .dll from it. If you are not comfortable/aware/willing to do this, then skip this part, but be warned: we cannot guarentee how well the site will function, if at all. If you are continuing, then find the source code on google, it isn't hard to find. Next, compile the .dll - I will not be telling you how to do this; if you don't know how yet for some reason are trying anyway, then look it up. Put the .dll in
PostgreSQL Install Location\version.number\bin
and if all went well, you are good to go. Continue to the next step.
At this point, it is assumed that you have already forked and cloned a copy of the guild's github repository onto your computer. Again, I will not tell you how to do this; if you don't know, google it. Go to where you downloaded the repository to, and navigate to the server folder, and open config.js. If for some reason you do not have an editor capable of opening .js files, then install one (for Windows, I recommend Notepad++ or Sublime Text). This is where you need your Postgres login credentials: find 'postgres://localhost:5432/guild', and add your credentials, as shown; afterwards, save the file:
postgres://{USERNAME}:{PASSWORD}@localhost:5432/guild
Now, go back to command prompt and change the directory to the repository. Enter:
npm install
then
npm run-script reset-db
and lastly,
npm start
(or alternatively,
npm run-script start-dev
for slightly better stack traces) and wait for it to say 'listening on 3000'. If it doesn't say this (or an error occurs afterwards) then something has gone wrong. If it does, then congratulations, you are almost there! Open your browser and go to
http://localhost:3000/. If the site loads, then success; you are done! If not, something has gone wrong (obviously), which you can probably figure out to some extent by reading the error that almost definitely appeared in the command prompt.
If, after all this, you still do not have the site working, and have no idea what to do, then the following is all I have to say:
No offense, but you probably just aren't cut out for this. Development of any sort requires the ability to problem solve, and if you are completely lost then I don't know what else to say. Don't feel bad; Mahz didn't expect anyone to be able to help with the site, so anyone who can is a bonus. Sorry!