Skip to content

Commit

Permalink
chore: static addon page (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbanan666 authored Aug 30, 2024
1 parent f54be81 commit b8e3883
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/website/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ export default defineNuxtConfig({
],
},
},
routeRules: {
'/addon': {
ssr: false,
static: true,
},
},
devtools: { enabled: true },
devServer: {
host: '0.0.0.0',
Expand Down
3 changes: 3 additions & 0 deletions apps/website/server/plugins/start.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default defineNitroPlugin(() => {
const logger = useLogger('plugin-start')
const { twitchChannelId } = useRuntimeConfig()

if (!twitchChannelId) {
Expand All @@ -12,6 +13,8 @@ export default defineNitroPlugin(() => {
void twitchWoodlandController.serve()

setTimeout(checkIfStreamingNow, 5000)

logger.info('Twitch server started')
})

async function checkIfStreamingNow() {
Expand Down
2 changes: 2 additions & 0 deletions apps/website/server/utils/twitch/twitch.addon.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class TwitchAddonController {
return
}

this.#logger.info('Starting characters updater...')

this.#activeCharactersUpdater = setInterval(async () => {
for (const c of this.#activeCharacters) {
const checkTime = getDateMinusMinutes(4)
Expand Down

0 comments on commit b8e3883

Please sign in to comment.