<%= projectName %>
------------

Django service, located in `service/`; and AngularJS, located in `web/`, applications.

![egemsoft-logo](http://egemsoft.net/images/logo.png)


# Requirements
Python 2.7, pip  
Virtual environment wrapper  
Node JS & npm - [Installing Node.js](https://github.com/joyent/node/wiki/installing-node.js-via-package-manager)  
Bower package manager 
```bash
 $ npm install bower -g
```    
Python development dependencies. Install them with:  
```bash
$ sudo apt-get install libpq-dev python-dev
```  

# Install
After setting virtual environment and making workon run:  
```bash
 $ npm install -g bower grunt-cli
 $ npm install
```
After npm install phase pip requirements, bower dependencies are installed. 

# Database Setup
SQLite database is used for development. Initial db setup is required once. To do this run:
```bash
$ npm run syncdb
$ npm run loaddata
```

# Test
To run both Python and script tests run:  
```bash
 $ npm test
```

# Run
To run service webapp run:  
```bash
 $ python service/manage.py runserver --settings settings.dev
```

To run webapp run:  
```bash
 $ grunt serve
```

You should have built the (coffee, js) source files if you'd like to run the app on production environment. To do this run:  
```bash
$ npm run build
```

# Other npm scripts

- `$ npm run syncdb` 	   - Runs syncdb with service/manage.py.
- `$ npm run loaddata` 	   - Loads fixtures to db.
