diff --git a/app/config.example.json b/app/config.example.json new file mode 100644 index 0000000..c7e9b3f --- /dev/null +++ b/app/config.example.json @@ -0,0 +1,3 @@ +{ + "siteName": "book-tracker" +} \ No newline at end of file diff --git a/app/index.js b/app/index.js index 092f5fa..8ca7dde 100644 --- a/app/index.js +++ b/app/index.js @@ -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. diff --git a/server/config.example.json b/server/config.example.json index 66a8c76..16a0a7f 100644 --- a/server/config.example.json +++ b/server/config.example.json @@ -1,6 +1,5 @@ { "port": 3000, - "siteName": "book-tracker", "jwtSecretKey": "SomethingAtLeast32CharactersLong!", "tokenExpireDays": 7 } \ No newline at end of file