IcodeNet / employee-scheduling-api

An API component for Employee Scheduling application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Employee Scheduling API

Gitter Build Status Build status Dependency Status devDependency Status Coverage Status Code Climate License

Note: ⚠️ This project is under development.

An API component for Employee Scheduling application that makes employee scheduling and management easy, fast and mobile. The UI component for this application can be found here. I wrote a few blog posts about this project and they can be found on my blog.

Table of Contents

Technologies Used

Technologies Used

Features

##Installation & Configuration ###Platform & Tools You need to have installed follow tools on your machine:

###Installation The steps 3 and 8 are only required when you don't have local instance of Couchbase Server 4.0 configured. If you've already configured a local instance of Couchbase Server 4.0 or newer, the application can use this instance as long as you specify the credentials to connect to Couchbase within the application config.js file.

1. Clone or fork this repository:

$ git clone git@github.com:martinmicunda/employee-scheduling-api.git 
$ cd employee-scheduling-api

2. Install local dependencies

$ npm install

3. The following command will add a new ubuntu trusty64 box, and if an existing one is found, it will override it:

$ vagrant box add ubuntu/trusty64 --force

NOTE: This process may take a while, as most Vagrant boxes will be at least 200 MB big.

Verify that box was installed by running the list subcommand that will list the boxes installed within Vagrant along with the provider that backs the box:

$ vagrant box list
ubuntu/trusty64  (virtualbox, 14.04)

4. The following command will install an ansible roles for this project, and if an existing one is found, it will override it:

$ ansible-galaxy install franklinkim.docker franklinkim.docker-compose moviedo.nvm --force

Verify that ansible roles were installed by running the list subcommand that will list the installed roles:

$ ansible-galaxy list
franklinkim.docker, 1.5.0
franklinkim.docker-compose, 1.1.0
moviedo.nvm, v1.1.1

5. Now, run vagrant up command that will install Docker, Docker Compose, NVM inside of vagrant box:

$ vagrant up

NOTE: Vagrant will provision the virtual machine only once on the first run, any subsequent provisioning must be executed with the --provision flag either vagrant up --provision or vagrant reload --provision . The provisioning will re-run also if you destroy the VM and rebuild it with vagrant destroy and vagrant up .

6. Once the box is up and running we can ssh into box:

$ vagrant ssh

and run Couchbase Server:

$ cd api
$ docker-compose up db

NOTE: This process may take a while, when you run this command for the first time as it pull couchbase docker image from docker repository.

7. As we are running the Couchbase Server for the first time we need to make sure the server is configured properly before we start any development. The below command will provision Couchbase Server instance:

$ npm run setup

8. Now when we provisioned Couchbase Server instance we can seed this instance with an application data:

$ npm run seed

Finally, open up your browser and navigate to Couchbase admin UI http://localhost:8091 with username: Administrator and password: password.

##How to Run

Start the couchbase:

$ vagrant up && vagrant ssh
$ cd api
$ docker-compose up db

Start the server:

$ npm start

NOTE: The dotenv is use as an environment variable manager that loads environment variables from .env into ENV (process.env).

Start the server with nodemon:

$ npm run dev

From time to time you might want to reset and seed data; to achieve this you can run a follow command:

$ npm run seed

##How to Test TODO

##How to Release TODO

FAQ

What if I want to uninstall application?

1. The following command would permanently removes the default virtual box from your machine:

$ vagrant destroy

2. The following command will uninstall an ansible roles for this project:

$ ansible-galaxy uninstall franklinkim.docker franklinkim.docker-compose moviedo.nvm

3. The following command will remove trusty64 box:

$ vagrant box remove trusty64

###What if I want a fresh install? If you wish to destroy the default virtual boxe to make sure you have a fresh start, you can do these steps:

 $ vagrant destroy 
 $ vagrant up

License

Copyright (c) 2014-2015 Martin Micunda  

Source code is open source and released under the GNU GPL v3 license.

About

An API component for Employee Scheduling application.

License:GNU General Public License v3.0


Languages

Language:JavaScript 83.5%Language:HTML 16.5%