MEAN Seed Project
A single page app seed project for building RESTful apps with node, mongo, express, and angular
- Built on Foundation with responsive templates
- True Single Page App with configurable page transitions/animations
- User account signup flow with email confirmation
- Password reset flow using one-time email tokens
- Simple admin interface for account management
- Authentication with sessionStore sessions, 'remember me' option for long sessions
- Expandable authorization system using page and route-level role checking
- Easy integration with hosted mongoDB services
- Grunt tasks to build and test distribution versions
How to Use
As a seed project, the MEAN Seed application should be easy to set up and modify. Start by making sure you have the prerequisites installed then clone or download the project, enter a few configuration options, and launch the dev environment.
The MEAN Seed depends on a few well-known technologies. Install these first.
- node.js - Install node.js
- Grunt - Install the Grunt task runner CLI
- SASS - Install SASS (you may also need to install or upgrade Ruby)
- git - (Optional) Your MEAN Seed project will be easier to manage if it's version controlled with git
- mongoDB - (Optional) To run the project locally, you'll need a local mongoDB instance. Alternately, you can set up a hosted instance (with a provider like MongoHQ) and configure the local environment to use that instead.
The MEAN seed project needs a few configuration options set before it will run. Configuration files are found in the /server/config/ folder.
- Environments (env-config.js) - Like many node.js apps, the project uses an environment variable named
NODE_ENVto specify the application's run mode. The MEAN Seed uses the typical development, staging, and production environments but you can also add your own.
- Specify your desired database and session store connection strings for each environment.
- Set your app name.
- Set the web root paths for the client and server app (if you change the default locations).
- Email (email-config.js) - Email is used for new account confirmations and password resets.
- Set up your desired email service credentials.
- Update the email sender, subject, and body text as desired.
- Sessions (express-config.js) - The MEAN Seed uses cookie-based login sessions for authentication. You can set the session cookie name and secret here.
To expedite testing, the MEAN Seed includes some test user data that can be populated each time the app loads in the development environment. You can customize this data in the /server/data/dev-data.js file.
The MEAN Seed uses npm and bower to manage dependencies. To install and update server application and build system dependencies run
npm install from the project root. To install and update the client application dependencie run
bower update from the project root. If you'd like to automatically update dependencies when the application starts in the dev environment, uncomment the npm/bower lines in startdev.sh.
Start the Dev Environment
The MEAN Seed application is self-contained. The REST service and the client app are both run from a simple node server. In local development, the node server listens on localhost:9000. To start the application in a local dev environment, simply run the command: