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
3 changed files with 496 additions and 497 deletions
Showing only changes of commit d52e5bf29a - Show all commits

977
index.js

File diff suppressed because one or more lines are too long

View file

@ -12,9 +12,9 @@ module.exports = (helmet, html, preloadedState) => {
${helmet.meta.toString()}
${helmet.link.toString()}
<!--style sheets-->
<link rel="stylesheet" href="/assets/css/reset.css" type="text/css">
<link rel="stylesheet" href="/assets/css/general.css" type="text/css">
<link rel="stylesheet" href="/assets/css/mediaQueries.css" type="text/css">
<link rel="stylesheet" href="/static/assets/css/reset.css" type="text/css">
<link rel="stylesheet" href="/static/assets/css/general.css" type="text/css">
<link rel="stylesheet" href="/static/assets/css/mediaQueries.css" type="text/css">
<!--google font-->
<link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet">
</head>
@ -25,7 +25,7 @@ module.exports = (helmet, html, preloadedState) => {
<script>
window.__PRELOADED_STATE__ = ${JSON.stringify(preloadedState).replace(/</g, '\\\u003c')}
</script>
<script src="/bundle/bundle.js"></script>
<script src="/static/bundle/bundle.js"></script>
</body>
</html>
`;

View file

@ -47,14 +47,14 @@ 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.
// set HTTP headers to protect against well-known web vulnerabilties
app.use(helmet());
// 'express.static' to serve static files from public directory
if (siteConfig.routes.public) {
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.
if (siteConfig.routes.publicFolder) {
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.
// take in a different public folder, so it can serve it's own bundle if needed
const { publicFolder } = siteConfig.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.
app.use(express.static(publicFolder))
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 publicFolder = Path.resolve(process.cwd(), siteConfig.routes.publicFolder);
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('/static', express.static(publicFolder));
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.info('serving static files from custom path:', publicFolder);
} else {
const publicPath = Path.resolve(__dirname, 'public');
app.use(express.static(publicPath));
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('/static', express.static(publicPath));
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.info('serving static files from default path:', publicPath);
};
// 'body parser' for parsing application/json

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.