[READ-ONLY] Mirror of https://github.com/probablykasper/yt-email-notifier. macOS menubar app for YouTube upload notification emails
email menubar notifications tray youtube
0

Configure Feed

Select the types of activity you want to include in your feed.

use different port for dev server

Kasper (Nov 17, 2020, 4:15 AM +0100) 703a1dcb 63a50d5b

+7 -6
+2
main.js
··· 8 8 menubar.init({ 9 9 openServerNow: true, 10 10 openBrowserNow: false, 11 + port: 9299, 11 12 }) 12 13 } else { 13 14 menubar.init({ 14 15 openServerNow: false, 15 16 openBrowserNow: false, 17 + port: 9199, 16 18 }) 17 19 } 18 20
+3 -3
src/menubar.js
··· 9 9 module.exports.init = async function(options = {}) { 10 10 11 11 if (options.openServerNow) { 12 - await server.open() 13 - if (options.openBrowserNow) opener('http://localhost:9199') 12 + await server.open(options.port) 13 + if (options.openBrowserNow) opener('http://localhost:'+options.port) 14 14 } 15 15 16 16 const autoLauncher = process.env.APP_ENV === 'dev' ··· 37 37 enabled: true, 38 38 handler: async () => { 39 39 await server.open() 40 - opener('http://localhost:9199') 40 + opener('http://localhost:'+options.port) 41 41 }, 42 42 }, 43 43 {
+1 -2
src/server.js
··· 396 396 397 397 398 398 let isOpen = false 399 - const port = 9199 400 399 401 - module.exports.open = async () => { 400 + module.exports.open = async (port) => { 402 401 if (isOpen) return 403 402 server = http.createServer(app).listen(port, err => { 404 403 if (err) return logger.error('ERROR OPENING SERVER')
+1 -1
web/index.js
··· 1 1 const $ = window.$ 2 2 3 - const ws = new WebSocket('ws://localhost:9199/ws') 3 + const ws = new WebSocket('ws://localhost:'+location.port+'/ws') 4 4 5 5 ws.onopen = () => { 6 6 console.log('WS open')