0.0.4 • Published 8 years ago

mean-task v0.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

mean-task

A MEAN task list!

Demo task list application built on MEAN stack.

There are two methods for deploying the application.

  1. Git Clone + Vagrant
  2. npm

Use one of the two deployment methods below, followed by the start section.

1. Vagrant Deployment

From Git Bash:

$ git clone https://github.com/studyingMole/mean-task.git

$ cd mean-task

$ vagrant up

Vagrant will provision the box at this point. It may take some time ...

$ vagrant ssh

$ cd /vagrant

$ npm install

If running the Vagrant box on a Windows host, run the install command with the --no-bin-links switch.

2. npm Deployment

Navigate to a folder where you want to deploy the application

$ npm install mean-task

$ cd node_modules/mean-task

Start the MEAN app

$ npm run start

The application should start listening on port 3000.

Point your favourite web browser to http://localhost:3000

Development Tools

There are a couple development tools included in the dependencies:

  • mocha
  • browserify
  • nodemon

To make use of node.js features in the angular files, the index.js file needs to be compiled if any changes are made to the angular files (in the /client folder).

Use npm to build the compiled index.js file:

$ npm run build

A set of mocha test are also included to test the "server" API. To run the tests, simply run:

$ npm run test

There's currently a bug when running test for the first time after bringing up a Vagrant box, npm will throw errors due to something in the "before all" hook. Just re-run the test command and it should work as expected then.

Lastly, the start command starts the app with the nodemon module which allows the server to be quickly reloaded. Simply type rs in the console while the web server is running to reload the web server.

Nodemon should automatically reload the server when it detects a file update in the directory, but this doesn't always work ...