Move siteName to new config.json for frontend
This commit is contained in:
parent
3b9d40ab7b
commit
b4d6482994
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"siteName": "book-tracker"
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
import choo from 'choo';
|
import choo from 'choo';
|
||||||
|
|
||||||
|
import config from './config.json';
|
||||||
import { viewManager } from './views/manager';
|
import { viewManager } from './views/manager';
|
||||||
|
|
||||||
const app = choo();
|
const app = choo();
|
||||||
|
@ -17,6 +18,7 @@ app.use((state, emitter) => {
|
||||||
|
|
||||||
// Listeners
|
// Listeners
|
||||||
emitter.on('DOMContentLoaded', () => {
|
emitter.on('DOMContentLoaded', () => {
|
||||||
|
document.title = config.siteName;
|
||||||
// Emitter listeners
|
// Emitter listeners
|
||||||
emitter.on('render', callback => {
|
emitter.on('render', callback => {
|
||||||
// This is a dirty hack to get the callback to call *after* re-rendering.
|
// This is a dirty hack to get the callback to call *after* re-rendering.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
"port": 3000,
|
"port": 3000,
|
||||||
"siteName": "book-tracker",
|
|
||||||
"jwtSecretKey": "SomethingAtLeast32CharactersLong!",
|
"jwtSecretKey": "SomethingAtLeast32CharactersLong!",
|
||||||
"tokenExpireDays": 7
|
"tokenExpireDays": 7
|
||||||
}
|
}
|
Loading…
Reference in New Issue