Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #652 from codydaig/gh-pages
Browse files Browse the repository at this point in the history
Overview, Troubleshooting, and Permalinks
  • Loading branch information
ilanbiala committed Jul 29, 2015
2 parents d9bf7f1 + 15c67d2 commit e343a96
Show file tree
Hide file tree
Showing 12 changed files with 379 additions and 135 deletions.
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
title: MEAN.JS
email: support@meanjs.org
description: > # Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://meanjs.org/" # the base hostname & protocol for your site
baseurl: "" # For the Live MEAN WEBSITE
url: "http://meanjs.org/" # FOR THE LIVE MEAN WEBSITE
twitter_username: Meanjsorg
github_username: meanjs

Expand Down
8 changes: 7 additions & 1 deletion _includes/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,10 @@
left: 0;
width: 100%;
height: 100%;
}
}

@media (min-width: 979px) {
ul.nav li.dropdown:hover > ul.dropdown-menu {
display: block;
}
}
99 changes: 99 additions & 0 deletions _includes/docs/0.3.x/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<section class="row">
<div class="col-md-2">
<nav class="nav-docs" role="complementary">
<ul class="nav nav-pills nav-stacked">
<li>
<a href="#overview">Overview</a>
</li>
<li>
<a href="#getting-started">Getting Started</a>
</li>
<li>
<a href="#troubleshooting">Troubleshooting</a>
</li>
<li>
<a href="#folder-structure">Folder Structure</a>
</li>
<li>
<a href="#configuration">Configuration</a>
</li>
<li>
<a href="#autoload">Autoloaded Files</a>
</li>
<li>
<a href="#npm">NPM</a>
</li>
<li>
<a href="#bower">Bower</a>
</li>
<li>
<a href="#grunt">Grunt</a>
</li>
<li>
<a href="#express">Express &amp; Routing</a>
</li>
<li>
<a href="#passport">Passport</a>
</li>
<li>
<a href="#backend-views">Backend Views</a>
</li>
<li>
<a href="#server-tests">Server Tests</a>
</li>
<li>
<a href="#angularjs-tests">AngularJS Tests</a>
</li>
<li>
<a href="#angularjs-modules">AngularJS Modules</a>
</li>
<li>
<a href="#menus">AngularJS Menus Service</a>
</li>
<li>
<a href="#article-example">The Article Example</a>
</li>
</ul>
</nav>
</div>
<section class="col-md-10 col-md-offset-2">
<i class="small text-muted">
Last updated: 03 Aug 2014.
</i>

{% include docs/0.3.x/overview.html %}

{% include docs/0.3.x/gettingstarted.html %}

{% include docs/0.3.x/troubleshooting.html %}

{% include docs/0.3.x/folderstructure.html %}

{% include docs/0.3.x/configuration.html %}

{% include docs/0.3.x/autoload.html %}

{% include docs/0.3.x/npm.html %}

{% include docs/0.3.x/bower.html %}

{% include docs/0.3.x/grunt.html %}

{% include docs/0.3.x/express.html %}

{% include docs/0.3.x/passport.html %}

{% include docs/0.3.x/backendviews.html %}

{% include docs/0.3.x/servertests.html %}

{% include docs/0.3.x/angularjstests.html %}

{% include docs/0.3.x/angularjsmodules.html %}

{% include docs/0.3.x/menus.html %}

{% include docs/0.3.x/articleexample.html %}

</section>
</section>
94 changes: 94 additions & 0 deletions _includes/docs/0.4.x/gettingstarted.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<div class="inner-link-anchor" id="getting-started"></div>
<section class="page-header">
<h1>Getting Started</h1>
</section>
<section>
<p>
In this section you'll learn how to get started with a MEAN.JS application, install all the prerequisites, and initialize your application.
</p>
<h2>Prerequisites</h2>
<p>
Before you begin, you should make sure you have installed all these prerequisites on your development machine.
</p>
<br>
<dl class="dl-horizontal">
<dt>Node.js &amp; npm</dt>
<dd>
<a target="_blank" href="http://www.nodejs.org/download">Download &amp; Install</a> Node.js and the npm package manager, if you encounter any problems, you can also use this <a target="_blank" href="https://gist.github.com/isaacs/579814">Github Gist</a> to install Node.js.
</dd>
<dt>MongoDB</dt>
<dd>
<a target="_blank" href="http://www.mongodb.org/downloads">Download &amp; Install</a> MongoDB, and make sure it's running on the default port (27017).
</dd>
<dt>Bower</dt>
<dd>
You're going to use the <a target="_blank" href="http://bower.io">Bower Package Manager</a> to manage your front-end packages, in order to install it make sure you've installed Node.js and npm, then install bower globally using npm:
<pre>$ npm install -g bower</pre>
</dd>
<dt>Grunt</dt>
<dd>
You're going to use the <a target="_blank" href="http://gruntjs.com/">Grunt Task Runner</a> to automate your development process, in order to install it make sure you've installed Node.js and npm, then install grunt globally using npm:
<pre>$ npm install -g grunt-cli</pre>
</dd>
</dl>
<p class="alert alert-info">
<b>Note:</b> Your user might not have the permissions to install package globally, so use a super user or <b>sudo</b>.
</p>
<h2>Downloading MEAN.JS</h2>
<p>
There are several ways you can get the MEAN.JS boilerplate:
</p>
<h3>Yo Generator</h3>
<p>The generator is still in development. See the <a href="https://github.com/meanjs/generator-meanjs/tree/0.4-dev">Generator Repo</a> for information on how to use the development version.
</p>
<p class="alert alert-info">
<b>Note:</b> If you want to support
<em>git merge</em>updates it would be better to use
<em>git clone</em>for your initial project creation, don't worry you'd still be able use the generator.
</p>
<h3>Cloning The GitHub Repository</h3>
<p>
You can also use Git to directly clone the MEAN.JS repository and switching to the 0.4.0 branch:
</p>
<pre>$ git clone https://github.com/meanjs/mean.git meanjs</pre>
<pre>$ git checkout 0.4.0</pre>
<p>
This will clone the latest version of the MEAN.JS repository to a meanjs folder.
</p>
<h3>Downloading The Repository Zip File</h3>
<p>
Another way to use the MEAN.JS boilerplate is to download a zip copy from the master branch on github. You can also do this using wget command:
</p>
<pre>$ wget https://github.com/meanjs/mean/archive/0.4.0.zip -O meanjs.zip; unzip meanjs.zip; rm meanjs.zip</pre>
<p>
Don't forget to rename mean-0.4.0 after your project name.
</p>
<h2>Quick Install</h2>
<p>
Once you've installed all the prerequisites, you're just a few steps away from starting to develop you MEAN application.
</p>
<p>
The first thing you should do is install the Node.js dependencies. The boilerplate comes pre-bundled with a <b>package.json</b> file that contains the list of modules you need to start your application, to learn more about the modules installed visit the <a href="#npm">NPM &amp; Package.json</a> section.
</p>
<p>
To install Node.js dependencies you're going to use npm again, just run this in the command-line:
<pre>$ npm install</pre>
<br>This command does a few things:
<ul>
<li>First it will install the dependencies needed for the application to run.</li>
<li>If you're running in a development environment, it will then also install development dependencies needed for testing and running your application.</li>
<li>Finally, when the install process is over, npm will initiate a
<code>bower install</code>command to install all the front-end modules needed for the application.</li>
</ul>
</p>
<h2>Running Your Application</h2>
<p>
After the install process is over, you'll be able to run your application using Grunt, just run grunt default task:
<pre>$ grunt</pre>
Your application should run on the 3000 port so in your browser just go to <a target="_blank" href="http://localhost:3000">http://localhost:3000</a>.
</p>
<p>
That's it! your application should be running by now, to proceed with your development check the other sections in this documentation.
<br>If you encounter any problem try the <a href="#troubleshooting">Troubleshooting</a> section.
</p>
</section>
32 changes: 32 additions & 0 deletions _includes/docs/0.4.x/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<section class="row">
<div class="col-md-2">
<nav class="nav-docs" role="complementary">
<ul class="nav nav-pills nav-stacked">
<li>
<a href="#overview">Overview</a>
</li>
<li>
<a href="#getting-started">Getting Started</a>
</li>
<li>
<a href="#troubleshooting">Troubleshooting</a>
</li>
</ul>
</nav>
</div>
<section class="col-md-10 col-md-offset-2">
<i class="small text-muted">
Last updated: 14 Jul 2015.
</i>

<div class="alert alert-danger" role="alert"><strong>This documentation is for version 0.4.0 and both the documentation and code are under development!</strong>
If you discover any issues or typos in the documentation, please let us know by submitting on issue on github or submitting a pull request.</div>

{% include docs/0.4.x/overview.html %}

{% include docs/0.4.x/gettingstarted.html %}

{% include docs/0.4.x/troubleshooting.html %}

</section>
</section>
30 changes: 28 additions & 2 deletions _includes/docs/0.4.x/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,31 @@ <h1>Overview</h1>
<section>
Thank you for downloading the MEAN.JS boilerplate!
<br>
<br>This is the start to the 0.4.0 Documentation.
</section>
<br>This simple documentation will cover the basics of developing your MEAN application.
<br>
<br>Before you begin we recommend you read about the basic building blocks that assemble a MEAN.JS application:
<br>
<br>
<dl>
<dt>MongoDB</dt>
<dd>
Go through <a target="_blank" href="http://mongodb.org">MongoDB Official Website</a> and proceed to its <a target="_blank" href="http://docs.mongodb.org/manual/">Great Manual</a>, which should help you understand NoSQL and MongoDB better.
</dd>
<dt>Express</dt>
<dd>
The best way to understand express is through its <a target="_blank" href="http://expressjs.com"> Official Website</a>, particularly <a target="_blank" href="http://expressjs.com/guide.html">The Express Guide</a>; you can also go through this <a target="_blank" href="http://stackoverflow.com/questions/8144214/learning-express-for-node-js">StackOverflow Thread</a> for more resources.
</dd>
<dt>AngularJS</dt>
<dd>
Angular's <a target="_blank" href="http://angularjs.org">Official Website</a> is a great starting point. You can also use <a target="_blank" href="http://www.thinkster.io/">Thinkster Popular Guide</a>, and the <a target="_blank" href="https://egghead.io/">Egghead Videos</a>.
</dd>
<dt>Node.js</dt>
<dd>
Start by going through <a target="_blank" href="http://nodejs.org">Node.js Official Website</a> and this <a target="_blank" href="http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-node-js">StackOverflow Thread</a>, which should get you going with the Node.js platform in no time.
</dd>
</dl>
When you're done with those resources and feel you understand the basic principals continue to other sections.
<br>
<br>Enjoy &amp; keep us updated,
<br>The MEAN.JS Team.
</section>
91 changes: 91 additions & 0 deletions _includes/docs/0.4.x/troubleshooting.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<div class="inner-link-anchor" id="troubleshooting"></div>
<section class="page-header">
<h1>Troubleshooting</h1>
</section>
<section>
During the installation process you may encounter some problems, so what can you do?

<h2>Check Node.js and npm Versions</h2>
<p>
The rapid advancements in JavaScript modules can sometimes cause version issues with the MEAN's dependencies. We try to keep up with the stable versions, and make sure the modules versions are compatible with those versions. We can't control the pre-installed platforms versions, so make sure you didn't install unsupported versions of Node.js and MongoDB.
</p>
<dl>
<dt>MongoDB</dt>
<dd>
MongoDB version 2.4.x is supported.
</dd>
<dt>Node.js</dt>
<dd>
Node version 0.10.x is supported.
</dd>
<dt>npm</dt>
<dd>
npm version 1.3.x is supported.
</dd>
</dl>
<h2>Update npm, Bower or Grunt</h2>
<p>
You may find there is a weird error during install like npm's Error: ENOENT, usually updating those tools to the latest version solves the issue.
</p>
<dl>
<dt>Updating npm (Unix/Linux)</dt>
<dd>
To update npm just run this command in the command-line:
<pre>$ npm update -g npm</pre>
</dd>
<dt>Updating npm (Windows)</dt>
<dd>
<p>
There is a known issue with npm 1.x which is installed by default with the latest version of NodeJS. If you experience file locks during the "npm install" step, please refer
<a href="https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows">here</a>.
</p>
</dd>
<dt>Updating Bower</dt>
<dd>
To update bower just run this command in the command-line:
<pre>$ npm update -g bower</pre>
</dd>
<dt>Updating Grunt</dt>
<dd>
To update grunt just run this command in the command-line:
<pre>$ npm update -g grunt-cli</pre>
</dd>
</dl>
<h2>Cleaning npm and Bower cache</h2>
<p>
Both npm and Bower uses a caching system that caches the packages you already installed. Often cleaning npm &amp; Bower's cache can solve some of the issues you encounter during the installation process.
</p>
<dl>
<dt>Cleaning npm's cache</dt>
<dd>
To clean npm's cache just run this command in the command-line:
<pre>$ npm cache clean</pre>
</dd>
<dt>Cleaning Bower's cache</dt>
<dd>
To clean bower's cache just run this command in the command-line:
<pre>$ bower cache clean</pre>
</dd>
</dl>
<h2>Common Issues</h2>
<p>
There are some common errors while installing mean:
</p>
<dl>
<dt>Node is running but AgnularJS application won't load</dt>
<dd>
Check to see all your front-end packages were installed.
<a target="_blank" href="https://bower.io/">Bower</a> package manager is used to install the front-end package and it will need a <a target="_blank" href="http://bower.io/#configuration">.bowerrc</a> file to install the packages in the right location.
<br>Bower should install the packages in the <b>public/lib</b> folder, so if this folder or some of its sub-folders doesn't exist, run:
<pre>$ bower update</pre>
This will install the missing packages.
</dd>
<dt>Error: failed to connect to [localhost:27017]</dt>
<dd>
If you use a local MongoDB check to see if its running. In case you use an external service verify the URI in the <a href="#configuration">configuration files</a>.
</dd>
</dl>
<p class="alert alert-warning">
Sometimes it can be a local issue or something that we didn't cover, in case you have any further questions please contact us via the community page.
</p>
</section>
Loading

0 comments on commit e343a96

Please sign in to comment.