Speech as a package #416

Merged
bones7242 merged 89 commits from speech-as-a-package into master 2018-04-18 21:47:34 +02:00
6 changed files with 10206 additions and 10523 deletions
Showing only changes of commit 6e46e3271d - Show all commits

20551
index.js

File diff suppressed because one or more lines are too long

View file

@ -7,19 +7,32 @@ const helmet = require('helmet');
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
const cookieSession = require('cookie-session');
const http = require('http');
const logger = require('winston');
const requestLogger = require('middleware/requestLogger.js');
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
function Server () {
this.configureLogger = (loggerConfig) => {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('loggerConfig.js').configure(loggerConfig);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
}
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
this.configureMysql = (mysqlConfig) => {
require('../config/mysqlConfig.js').configure(mysqlConfig);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('mysqlConfig.js').configure(mysqlConfig);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
};
this.configureSite = (siteConfig) => {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('../config/siteConfig.js').configure(siteConfig);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
this.configureSiteDetails = (siteConfig) => {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('siteConfig.js').configure(siteConfig);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
this.sessionKey = siteConfig.auth.sessionKey;
this.PORT = siteConfig.details.port;
};
this.configureSlack = (slackConfig) => {
require('../config/slackConfig.js').configure(slackConfig);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('slackConfig.js').configure(slackConfig);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
};
this.configureClientBundle = () => {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
console.log('configure the client here by passing in the bundle and configuring it, or better yet: taking in the components to use dynamically from here.');
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
}
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
this.configureModels = () => {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
console.log('here is where you could add/overwrite the default models')
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
}
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
this.configureRoutes = () => {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
console.log('here is where you could add/overwrite the default routes')
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
}
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
this.createApp = () => {
// create an Express application
const app = express();
@ -30,12 +43,12 @@ function Server () {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
// add middleware
app.use(helmet()); // set HTTP headers to protect against well-known web vulnerabilties
app.use(express.static(`${__dirname}/public`)); // 'express.static' to serve static files from public directory
// note: take in a different public folder, so it can serve it's own bundle from there?
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
app.use(bodyParser.json()); // 'body parser' for parsing application/json
app.use(bodyParser.urlencoded({ extended: true })); // 'body parser' for parsing application/x-www-form-urlencoded
app.use((req, res, next) => { // custom logging middleware to log all incoming http requests
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
next();
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
});
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
// add custom middleware (note: build out to accept dynamically use what is in server/middleware/
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
app.use(requestLogger);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
// configure passport
const speechPassport = require('speechPassport');
@ -57,17 +70,17 @@ function Server () {
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
app.set('view engine', 'handlebars');
// set the routes on the app
require('./routes/auth.js')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/api.js')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/pages.js')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/assets.js')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/fallback.js')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/auth/')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/api/')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/pages/')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/assets/')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./routes/fallback/')(app);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
this.app = app;
};
this.initialize = () => {
require('./helpers/configureLogger.js')(logger);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
require('./helpers/configureSlack.js')(logger);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
// require('./helpers/configureLogger.js')(logger);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
// require('./helpers/configureSlack.js')(logger);
neb-b commented 2018-04-17 22:37:07 +02:00 (Migrated from github.com)
Review

For these you can just do

this.configureLogger = loggerConfig.update
For these you can just do ``` this.configureLogger = loggerConfig.update ```
neb-b commented 2018-04-17 22:39:55 +02:00 (Migrated from github.com)
Review

Do we need to have any maxAge? It would be nice if the user was never logged out

Do we need to have any `maxAge`? It would be nice if the user was never logged out
neb-b commented 2018-04-17 22:40:27 +02:00 (Migrated from github.com)
Review

I thought handlebars was removed?

I thought handlebars was removed?
bones7242 commented 2018-04-18 21:29:39 +02:00 (Migrated from github.com)
Review

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.

it's still being used in one specific case: for sharing videos on twitter via cards, twitter needs an html page with a video player embedded, so I am using handlebars to generate that one page when needed.
bones7242 commented 2018-04-18 21:47:28 +02:00 (Migrated from github.com)
Review

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.

I guess we don't need to, and it does make a better user experience if the user doesn't need to log back in ever day. I eliminated the maxAge so sessions should last indefinitely.
this.createApp();
this.server = http.Server(this.app);
};

View file

@ -0,0 +1,8 @@
const logger = require('winston');
const requestLogger = (req, res, next) => { // custom logging middleware to log all incoming http requests
logger.verbose(`Request on ${req.originalUrl} from ${req.ip}`);
next();
};
module.exports = requestLogger;

View file

@ -5,11 +5,75 @@ const File = require('models/file.js');
const Request = require('models/request.js');
const User = require('models/user.js');
module.exports = {
Certificate,
Channel,
Claim,
File,
Request,
User,
}
const Sequelize = require('sequelize');
const logger = require('winston');
const {database, username, password} = require('mysqlConfig.js');
// set sequelize options
const sequelize = new Sequelize(database, username, password, {
host : 'localhost',
dialect : 'mysql',
dialectOptions: {decimalNumbers: true},
logging : false,
pool : {
max : 5,
min : 0,
idle : 10000,
acquire: 10000,
},
});
// establish mysql connection
sequelize
.authenticate()
.then(() => {
logger.info('Sequelize has established mysql connection successfully.');
})
.catch(err => {
logger.error('Sequelize was unable to connect to the database:', err);
});
// manually add each model to the db object (note: make this dynamic)
const db = {};
db['Certificate'] = sequelize.import('Certificate', Certificate);
db['Channel'] = sequelize.import('Channel', Channel);
db['Claim'] = sequelize.import('Claim', Claim);
db['File'] = sequelize.import('File', File);
db['Request'] = sequelize.import('Request', Request);
db['User'] = sequelize.import('User', User);
// run model.association for each model in the db object that has an association
logger.info('associating db models...');
Object.keys(db).forEach(modelName => {
if (db[modelName].associate) {
logger.info('Associating model:', modelName);
db[modelName].associate(db);
}
});
// add sequelize/Sequelize to db
db.sequelize = sequelize;
db.Sequelize = Sequelize;
// add an 'upsert' method to the db object
db.upsert = (Model, values, condition, tableName) => {
return Model
.findOne({
where: condition,
})
.then(obj => {
if (obj) { // update
logger.debug(`updating record in db.${tableName}`);
return obj.update(values);
} else { // insert
logger.debug(`creating record in db.${tableName}`);
return Model.create(values);
}
})
.catch(function (error) {
logger.error(`${tableName}.upsert error`, error);
throw error;
});
};
module.exports = db;

View file

@ -1,36 +1,7 @@
import App from 'app';
import Reducer from 'reducers';
import rootSaga from 'sagas';
import GAListener from 'components/GAListener';
const api = require('./server/routes/api/');
const asset = require('./server/routes/assets/');
const auth = require('./server/routes/auth/');
const page = require('./server/routes/pages/');
const logger = require('./config/loggerConfig.js');
const mysql = require('./config/mysqlConfig');
const site = require('./config/siteConfig');
const slack = require('./config/slackConfig.js');
const passport = require('./server/speechPassport/');
const models = require('./server/models/');
const Server = require('./server');
const exports = {
App,
Reducer,
rootSaga,
GAListener,
logger,
models,
mysql,
passport,
site,
slack,
routes: {
api,
asset,
auth,
page,
},
Server,
};
module.exports = exports;