Skip to content

IdarM/mean-webapp

Repository files navigation

Initial webapp based on MEAN Stack

MEAN is a framework for an easy starting point with MongoDB, Node.js, Express, and AngularJS based applications. It is designed to give you a quick and organized way to start developing MEAN based web apps with useful modules like Mongoose and Passport pre-bundled and configured. We mainly try to take care of the connection points between existing popular frameworks and solve common integration problems.

Prerequisite packages

  • Mean currently uses gulp as a build tool and bower to manage frontend packages.
$ npm install -g gulp
// and bower
$ npm install -g bower

Installation

To start with MEAN install the mean-cli package from NPM. This will add the mean command which lets you interact (install, manage, update ...) your Mean based application.

Install the MEAN CLI

$ npm install -g mean-cli
$ mean init <myApp>
$ cd <myApp> && npm install

Invoke node with a task manager

Mean supports the gulp task runner for various services which are applied on the code. To start your application run -

$ gulp

Alternatively, when not using gulp (and for production environments) you can run:

$ node server

Then, open a browser and go to:

http://localhost:3000

Running on a different port

If you have a rails, node, or other mean project already running, you may need to use a different port. You can set the port and start your new mean project with one command:

$ export PORT=3001 && gulp

Then, open a browser and change the port number before you visit:

  http://localhost:3001

Troubleshooting

During installation depending on your os and prerequisite versions you may encounter some issues.

Most issues can be solved by one of the following tips, but if you are unable to find a solution feel free to contact us via the repository issue tracker or the links provided below.

Update NPM, Bower or Gulp

Sometimes 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.

  • Updating NPM:
$ npm update -g npm
  • Updating Gulp:
$ npm update -g gulp
  • Updating Bower:
$ npm update -g bower

Cleaning NPM and Bower cache

NPM and Bower has a caching system for holding packages that you already installed. We found that often cleaning the cache solves some troubles this system creates.

  • NPM Clean Cache:
$ npm cache clean
  • Bower Clean Cache:
$ bower cache clean

About

MEAN webapp, based on the mean.js boilerplate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published