Skip to content

wolf-mtwo/attendance-old

Repository files navigation

ATTENDANCE

Prerequisites

  • MongoDB - Download and Install mongodb - Checkout their manual if you're just starting.
  • Node.js - Download and Install Node.js, nodeschool has free node tutorials to get you started.
  • Git - Get git using a package manager or download it.
  • Grunt - Download and Install Grunt.
$ npm install -g grunt-cli

Installation

$ npm install
$ bower install

Invoke node with Grunt

We recommend using Grunt to start the server:

  $ grunt

If grunt aborts because of JSHINT errors, these can be overridden with the force flag:

  $ grunt -f

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

  $ node server

Then, open a browser and go to:

  http://localhost:3000

Files structure

The file structure is similar to that of the mean project itself

Fundamental Files at the root of the package

Server

Packages are registered in the app.js Defines package name, version and mean=true in the package.json

All of the Server side code resides in the /server directory.

Server
--- config        # Configuration files
--- controllers   # Server side logic goes here
--- models        # Database Schema Models
--- routes        # Rest api endpoints for routing
--- views         # Swig based html rendering

Client

All of the Client side code resides in the /public directory.

public
--- assets        # Javascript/Css/Images (not aggregated)
--- controllers   # Angular Controllers
--- config        # Contains routing files
--- services      # Angular Services (also directive and filter folders)
--- views         # Angular views

All javascript within public is automatically aggregated with the exception of files in assets which can be manually added using the aggregateAsset() function

Environmental Settings

To run with a different environment, just specify NODE_ENV as you call grunt:

    $ NODE_ENV=test grunt

If you are using node instead of grunt, it is very similar:

    $ NODE_ENV=test node server

To simply run tests

    $ npm test

NOTE: Running Node.js applications in the production environment enables caching, which is disabled by default in all other environments.

More Information

License

We belive that mean should be free and easy to integrate within your existing projects so we chose the The MIT License