Skip to content

Latest commit

 

History

History
105 lines (72 loc) · 4.16 KB

quest1.md

File metadata and controls

105 lines (72 loc) · 4.16 KB

MongoDB

Getting MEAN

An Introduction to API-Centered Application Development with Node.js and MongoDB

Quest 1: Fearlessly Install!

As a heroic developer, you'll leverage the following weapons (technologies) to conquer foes (create applications):

  • MongoDB - A Most Heroic Database for data persistence.
  • ExpressJS - Web development framework for Node.js.
  • AngularJS - We'll not leverage this for much during this workshop.
  • Node.js - The JavaScript Application Development Framework of choice for heroic developers.

At the end of this quest, if you've successfully completed the requirements:

  • You will have installed MongoDB locally.
  • Test this by typing mongo from command line.
  • You will have installed Node.js locally.
  • Test this by typing node from command line.
  • You will have installed the Node Package Manager.
  • Test this by typing npm from command line.

MongoDB

To leverage MongoDB you will need to install the local command line utilities in your development environment.

You will need to install MongoDB locally so that you have access to the local command line utilities.

While you can certainly run MongoDB locally - you'll also be interested to know that you can run MongoDB in the cloud, for free using MongoDB Atlas.

Launching your first Atlas Cluster

Start the MongoDB Server

Before we get too far along our journey, let's get our newly installed MongoDB Server running. From a terminal window, we can get our server started with the following command:

mongod

Once it is up and running and waiting for connections on the default port of 27017, we can minimize that terminal window and continue on our quest.

Node.js

Here's the abbreviated guide, highlighting the major steps:

  1. Go to the Node.js Downloads page.
  2. Download Node.js for macOS by clicking the "Macintosh Installer" option
  3. Run the downloaded Node.js .pkg Installer
  4. Run the installer, including accepting the license, selecting the destination, and authenticating for the install.
  5. You're finished! To ensure Node.js has been installed, run node -v in your terminal - you should get something like v8.3.0

Node Package Manager (npm)

Node.js ships with a version of npm - the Node Package Manager. This may (or may not) be the latest, greatest version of npm and we should update that right out of the gate.

To update npm type the following from command line:

sudo npm install npm --global // Update the `npm` CLI client

Weapons, Tools and Resources

Concepts

Hints

None.

You are Here - Quests

Quest Description
Quest Zero First quest to read. Provides some overview information and background.
> Quest 1 Initialize your project and install some of the required software.
Quest 2 creating a quick test JavaScript.
Quest 3 Crafting your own tools: Building a server process using httpd and express
Quest 4 Building Your App
Quest 5 Defining the data for our application
Quest 6 Enter MongoDB - Native JavaScript
Quest 7 Creating and Reading data using the Native MongoDB Driver
Quest 8 Mongoose - Object Data Modeling
Quest 9 Creating and Reading data using Mongoose

Next quest

Next quest: Quest 2 - creating a quick test JavaScript.