Move siteName to new config.json for frontend

This commit is contained in:
Robbie Antenesse 2019-09-08 21:48:23 -06:00
parent 3b9d40ab7b
commit b4d6482994
3 changed files with 5 additions and 1 deletions

3
app/config.example.json Normal file
View File

@ -0,0 +1,3 @@
{
"siteName": "book-tracker"
}

View File

@ -1,5 +1,6 @@
import choo from 'choo';
import config from './config.json';
import { viewManager } from './views/manager';
const app = choo();
@ -17,6 +18,7 @@ app.use((state, emitter) => {
// Listeners
emitter.on('DOMContentLoaded', () => {
document.title = config.siteName;
// Emitter listeners
emitter.on('render', callback => {
// This is a dirty hack to get the callback to call *after* re-rendering.

View File

@ -1,6 +1,5 @@
{
"port": 3000,
"siteName": "book-tracker",
"jwtSecretKey": "SomethingAtLeast32CharactersLong!",
"tokenExpireDays": 7
}