This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #652 from codydaig/gh-pages
Overview, Troubleshooting, and Permalinks
- Loading branch information
Showing
12 changed files
with
379 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 & 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 & npm</dt> | ||
<dd> | ||
<a target="_blank" href="http://www.nodejs.org/download">Download & 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 & 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 & 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 & 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> |
Oops, something went wrong.