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 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.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"port": 3000,
|
||||
"siteName": "book-tracker",
|
||||
"jwtSecretKey": "SomethingAtLeast32CharactersLong!",
|
||||
"tokenExpireDays": 7
|
||||
}
|
Loading…
Reference in New Issue