-
Notifications
You must be signed in to change notification settings - Fork 19
[WIP]: Cloud endpoints and GAE Flex support #116
Conversation
Relates to #104
Update to over 500 GDG communities world-wide
…Mongo. upgrade to latest Express and related libraries convert tasks to be triggered directly instead of via Redis+Clustering convert cron to call new tasks remove deprecated express-annotations remove API docs since they depended upon express-annotations convert rate metering to in-memory only since Redis is no longer an option temporarily disable CSRF protection Fixes #96 #80
trying to get rid of `sys` is deprecated warning, but no luck
…111!!11 update mongoose use default network since Flex doesn't seem to work on Legacy network
it relied on `express-rate` which hasn't been updated in 5 years and depends on deprecated functions in NodeJS we will use Cloud Endpoints for rate metering instead Closes #115
trying to get rid of `sys` is deprecated warning, but no luck
…111!!11 update mongoose use default network since Flex doesn't seem to work on Legacy network
…loudEndpointsAndGaeFlex Conflicts: app.yaml lib/config/express.js lib/controllers/api/index.js package.json server.js
… cloudEndpointsAndGaeFlex Conflicts: lib/controllers/api/index.js server.js
cron: | ||
- description: daily 9am EST ingestion job | ||
url: / | ||
schedule: every day 13:00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- update this to do ingestion jobs once OpenAPI spec is done and Cloud Endpoints are all working.
port: process.env.PORT || process.env.NODEJS_PORT || 3000, | ||
hostname: process.env.NODEJS_IP || undefined, | ||
port: process.env.PORT || 3000, | ||
hostname: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was key in getting GAE Flex working. If I put anything in here it would cause forwarding from the GAE proxy to Express to fail and give 503
errors.
@@ -61,6 +65,13 @@ module.exports = function (app) { | |||
})); | |||
} | |||
|
|||
// Configure GAE proxy and health checks. Force HTTPS. | |||
app.enable('trust proxy'); | |||
// app.use(yesHttps({ maxAge: YES_HTTPS_MAX_AGE, includeSubdomains: true, preload: true })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Re-enable yes-http once HTTPS is working with hub.gdgx.io on Cloud Endpoints.
var morgan = require('morgan'); | ||
var compression = require('compression'); | ||
var bodyParser = require('body-parser'); | ||
// var yesHttps = require('yes-https'); | ||
const MongoStore = require('connect-mongo')(session); | ||
// var csrf = require('csurf'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Re-enable CSRF protection
"https" | ||
], | ||
"paths": { | ||
"/chapters": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenAPI Spec TODO:
- events API
- admin API
- applications API
- frisbee API
- metrics API
- tags API
- users API
- auth API
Work in progress. Looking for help with the OpenAPI Spec description here.
Support Cloud Endpoints and GAE Flex deployment.
Enable Cloud Debug and Cloud Trace.
Support NodeJS 6.x+.
Fix deprecation warnings from NodeJS.
Add GAE Health check support.
Closes #100. Closes #99.
Relates to #85.
Fixes #80.