solutionok / GPSTrackBoard

GPS Tracking App based MEAN.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPS tracking app based MEAN.js

Make sure you have installed all of the following prerequisites on your development machine:

$ npm install -g bower

Quick Install

Once you've downloaded the boilerplate and installed all the prerequisites, you're just a few steps away from starting to develop your MEAN application.

The boilerplate comes pre-bundled with a package.json and bower.json files that contain the list of modules you need to start your application.

To install the dependencies, run this in the application folder from the command-line:

$ npm install

This command does a few things:

  • First it will install the dependencies needed for the application to run.
  • If you're running in a development environment, it will then also install development dependencies needed for testing and running your application.
  • When the npm packages install process is over, npm will initiate a bower install command to install all the front-end modules needed for the application
  • To update these packages later on, just run npm update

Running Application

Run application using npm:

$ npm start

Application should run on port 3000 with the development environment configuration, so in the browser just go to http://localhost:3000

Running in Production mode

To run application with production environment configuration:

$ npm run start:prod

Explore config/env/production.js for production environment configuration options.

Testing Application

It can run the full test suite included with MEAN.JS with the test task:

$ npm test

This will run both the server-side tests (located in the app/tests/ directory) and the client-side tests (located in the public/modules/*/tests/).

To execute only the server tests, run the test:server task:

$ npm run test:server

To execute only the server tests and run again only changed tests, run the test:server:watch task:

$ npm run test:server:watch

And to run only the client tests, run the test:client task:

$ npm run test:client

Development and deployment With Docker

  • Install Docker

  • Install Compose

  • Local development and testing with compose:

$ docker-compose up
  • Local development and testing with just Docker:
$ docker build -t mean .
$ docker run -p 27017:27017 -d --name db mongo
$ docker run -p 3000:3000 --link db:db_1 mean
$
  • To enable live reload, forward port 35729 and mount /app and /public as volumes:
$ docker run -p 3000:3000 -p 35729:35729 -v /Users/mdl/workspace/mean-stack/mean/public:/home/mean/public -v /Users/mdl/workspace/mean-stack/mean/app:/home/mean/app --link db:db_1 mean

Production deploy with Docker

  • Production deployment with compose:
$ docker-compose -f docker-compose-production.yml up -d
  • Production deployment with just Docker:
$ docker build -t mean -f Dockerfile-production .
$ docker run -p 27017:27017 -d --name db mongo
$ docker run -p 3000:3000 --link db:db_1 mean

License

The MIT License

About

GPS Tracking App based MEAN.js


Languages

Language:JavaScript 90.2%Language:HTML 9.0%Language:Dockerfile 0.3%Language:CSS 0.3%Language:Shell 0.2%