Skip to content

Commit

Permalink
Update DEVELOPER.md with temporary workspace instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
xaun committed Nov 25, 2016
1 parent bc1583c commit c1c6be5
Showing 1 changed file with 56 additions and 19 deletions.
75 changes: 56 additions & 19 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,70 @@ Now you should an api key, api secret, and an organization associated to your Us

##### Steps to get impac loaded:

1. Terminal commands to load dependancies
Temporary instructions to get Impac! Angular running for development:

1. Create an account on http://impac-mnoe-uat.maestrano.io.
2. Fork impac-express (https://github.com/maestrano/impac-express) and clone it to your local machine
3. In the impac-express project, modify config/settings/development.yml as follow:

```ruby
impac:
protocol: https
host: api-impac-uat.maestrano.io
mno:
protocol: https
host: api-hub-uat.maestrano.io
```
npm install
bower install
4. In the impac-express project, create config/application.yml as follow:

```ruby
# Tenant Credentials
tenant_id: c6b44271-7334-0134-8df7-35f23abf243c
tenant_key: 4Vcpt_2GnCfhlyBYbN_bUQ

# Emailing platform
SPARKPOST_API_KEY: changeme

# Rails secret key
SECRET_KEY_BASE: e48e21d80b2943c1872f69fb3cf4f8a8c24bc9fa3abdc14549df2dc181d46bfb5698271fb4bc1511e45ba0633ef02b494985b67f6e418182014f95a5e600f808

# Google Tag Manager
google_tag_container: GTM-TH3MLB
```

2. Configuring with credentials & launching workspace
- Add your api_key & api_secret to the settings factory in the `workspace/index.js` file
5. Build and start the impac-express project:

```bash
bundle install
foreman start
```
6. Fork impac-angular (https://github.com/maestrano/impac-angular) and clone it to your local machine. _Note this method for running impac-angular is only valid from versions >= 1.4.5_.
7. In the impac-angular project, modify workspace/app/services/dev-settings.svc.js as follow:

```javascript
module.factory('settings', function () {
return {
// Credentials and endpoints
mno_url: 'https://uat.maestrano.io',
impac_url: 'https://api-impac-uat.maestrano.io',
api_key: 'YOUR_KEY',
api_secret: 'YOUR_SECRET',
var DEFAULTS = {
// API Endpoints
mnoeUrl: {
host: 'http://localhost:7000',
base: '/mnoe/jpi/v1'
},
impacUrl: {
host: 'https://api-impac-uat.maestrano.io',
base: '/api'
}
...
}
});
```
8. build and start the impac-angular project
3. There a few ways to prepare & launch the Impac Developer Workspace..
1. Run `gulp` or `gulp serve`, this will inject dependencies, serve impac-angular, and **live reload** on change.
2. Run `gulp serve:noreload`, if rebuilding the library on every change is using too much cpu - **you will need to run `gulp workspace` and refresh the page after every change**
2. Run `gulp workspace` to build and inject dependencies, the open the `workspace/index.html` file in a browser - **you will need to run `gulp workspace` and refresh the page after every change**
```bash
npm install
bower install
gulp
```
9. A new tab with the Developer Workspace will open in your browser, log-in with the email/password you've created at step 1.
10. You should be able to start coding in the project impac-angular: just saving any .coffee or .html file will automatically reload your Developer Workspace, applying your code.
11. To populate the Widgets and KPIs with data, integrate an App! I recommend Xero.
Note: Coming in a patch version soon you will be able to skip steps 2. to 5.
##### Workspace Architecture
Expand Down

0 comments on commit c1c6be5

Please sign in to comment.