Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
increase compatibility with Apigee Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo committed Jun 19, 2014
1 parent 8e522ed commit 318dced
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Expand Up @@ -13,7 +13,7 @@ results

npm-debug.log
node_modules
config/development.js
config/test.js
config/production.js
app/config/*development.js
app/config/*test.js
app/config/*production.js
registration.json
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -32,7 +32,8 @@ Deploying to Apigee
2. edit app/config/apigee-{env}.js to reflect your hosted usergrid settings (and optionally, passport settings)
3. run `NODE_ENV=apigee-{env} bin/create_sample_products`
4. run `NODE_ENV=apigee-{env} bin/register`
3. use apigeetool to deploy the app directory
5. run 'npm install' in the app directory
6. use apigeetool to deploy the app directory

// todo: make registration and populate part of a deployment command line?

Expand Down
5 changes: 4 additions & 1 deletion app/app
@@ -1,6 +1,7 @@
#!/usr/bin/env node
'use strict';

var Apigee = require('apigee-access');
var _ = require('lodash');
var express = require('express');
var app = express();
Expand All @@ -23,7 +24,9 @@ var cache = memoryCache.create('cache', {
app.use(cache.expressMiddleware());

app.use(express.logger());
//app.use(express.compress());
if (Apigee.getMode() !== Apigee.APIGEE_MODE) { // doesn't work on edge
app.use(express.compress());
}
app.use(express.json());
app.use(express.urlencoded());

Expand Down
16 changes: 11 additions & 5 deletions app/package.json
Expand Up @@ -35,6 +35,10 @@
"volos-quota-redis": "0.9.x",
"volos-management-redis": "0.9.x",
"volos-oauth-redis": "0.9.x",
"volos-cache-memory": "0.9.x",
"volos-quota-apigee": "0.9.x",
"volos-management-apigee": "0.9.x",
"volos-oauth-apigee": "0.9.x",
"lodash": "2.4.x",
"winston": "0.7.x",
"express": "3.4.x",
Expand All @@ -47,14 +51,16 @@
"passport-local": "1.0.x",
"passport-facebook": "1.0.x",
"passport-google-oauth": "0.1.x",
"request": "2.34.x"
"request": "2.34.x",
"apigee-access": "1.0.x"
},
"devDependencies": {
"should" : "x.x.x",
"supertest" : "x.x.x",
"mocha" : "x.x.x",
"underscore" : "x.x.x"
"should": "x.x.x",
"supertest": "x.x.x",
"mocha": "x.x.x",
"underscore": "x.x.x"
},
"scripts": {
"start": "./app"
}
}
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -35,7 +35,8 @@
"passport-local": "1.0.x",
"passport-facebook": "1.0.x",
"passport-google-oauth": "0.1.x",
"request": "2.34.x"
"request": "2.34.x",
"apigee-access": "1.0.x"
},
"devDependencies": {
"should" : "x.x.x",
Expand All @@ -44,6 +45,7 @@
"underscore" : "x.x.x"
},
"scripts": {
"install": "bin/link"
"install": "bin/link",
"start": "app/app"
}
}

0 comments on commit 318dced

Please sign in to comment.