raysarinas / Connect4-with-TootandOtto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connect4-with-TootandOtto

This application includes the computerized versions of the games "Connect4" and "Toot & Otto". The application is developed using the MEAN stack.

The MEAN Stack:

  MongoDB (the database)
  Express.js (the middleware)
  Angular.js (the client side magic)
  Node.js (the server)

The detailed instructions on set-up and execution of the project is discussed below.

Getting Started: Step 1: Install the MEAN stack

A. Install NodeJS and MongoDB on Windows

Installing NodeJS:
    i. Download the Windows installer from the https://nodejs.org/en/download/ web site.
    ii. Run the installer (the .msi file you downloaded in the previous step.)
    iii. Follow the prompts in the installer (Accept the license agreement, click the NEXT button a bunch of times and accept the default installation settings).
    iv. Restart your computer. You won’t be able to run Node.js until you restart your computer.
Testing the NodeJS installation:
     Open the Windows Command Prompt, Powershell or a similar command line tool, and type
  C:\> node -v
Testing NPM installation:
  C:\> npm -v
To Install MongoDB on Windows:
    i. Download the MongoDB installer file from the downloads section of the MongoDB website.
    ii. Find the dowloaded .msi file in the Windows Explorer. Double click the file and follow the prompts to install Mongo.
    iii. Start the mongodb daemon by running C:\mongodb\bin\mongod.exe in the Command Prompt.

B. Install NodeJS and MongoDB on MacOS:

Installing NodeJS:

i. Open the Terminal and enter:

$ node -v 

(If you have Node on your system, it will show the version)

ii. Update to the latest version using

$ npm i -g npm

iii. Assuming that you do not have Node already installed, proceed with one of the following methods:
    - The Installer at: https://nodejs.org/
    - The Homebrew way

i. First, you need to install Homebrew and this can be done by running the following command on Termnal:

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

ii. Once Homebrew installation completes, all you have to do is run the following command to install Node:

$ brew install node

iii. And you’re done. Just to be sure, to verify that the things are in order, in your Terminal run:

$ node -v
To Install and Run MongoDB with Homebrew

i. Open the Terminal app and type

$ brew update.

ii. After updating Homebrew brew

$ install mongodb

iii. Start the Mongo server by typing:

$ mongod

C. Install Express and AngularJS

To Install them on both Windows and MacOS type:

$ npm install express --save

$ sudo npm i -g @angular/cli

Step 2: Install Dependencies

i. Clone Github repository by typing

$ git clone https://github.com/thinking-fun/Connect4-with-TootandOtto.git

ii. Open Terminal and move to the project root directory
iii. To install the project dependencies mentioned in the Package.json file, type:

$ npm install

Step 3: Execute Project

i. Open Terminal and move to the project root directory
ii. In the Terminal window type:

$ npm start

npm start by default will run the application on port 3000. To view the application window, open browser and type:

http://localhost:3000/

Happy Coding!

About


Languages

Language:JavaScript 81.7%Language:HTML 17.8%Language:CSS 0.5%