You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 1.17.4 the command line method for disabling live reload does not seem to work well enough to stop a flurry of permission errors when the server is run in folders such as /home. I fixed this with a few changes in /usr/local/lib/node_modules/markserv/lib/server.js:
27-constpromptly=require('promptly')28-constisOnline=require('is-online')29-30-constpkg=require(path.join('..','package.json'))31-32:// CHANGE: Added:33-constblockLiveReload=true;34-35-conststyle={36-link: chalk.blueBright.underline.italic,37-github: chalk.blue.underline.italic,--532-}533-}534-}535-536-conststartConnectApp=(liveReloadPort,httpRequestHandler)=>{537: // CHANGE: New: (To allow blocking of live reload)538-if(blockLiveReload){539-returnconnect().use('/',httpRequestHandler)540-}else{541-returnconnect().use('/',httpRequestHandler)542-.use(connectLiveReload({543-port: liveReloadPort544-}))545-}546: // CHANGE: Old:547-/*548- return connect()549- .use(connectLiveReload({550- port: liveReloadPort551- }))552- .use('/', httpRequestHandler)553- */--687-consthttpRequestHandler=createRequestHandler(flags)688-constconnectApp=startConnectApp(liveReloadPort,httpRequestHandler)689-consthttpServer=awaitstartHTTPServer(connectApp,httpPort,flags)690-691-letliveReloadServer692: // CHANGE: Old:693-// if (liveReloadPort && liveReloadPort !== 'false') {694: // CHANGE: New: (I don't want live reload!!)695-if(!blockLiveReload&&(liveReloadPort&&liveReloadPort!=='false')){696-liveReloadServer=awaitstartLiveReloadServer(liveReloadPort,flags)697-}698-699-constserveURL='http://'+flags.address+':'+httpPort
Full file attached here: (Note this will probably download as a .txt file, .js files are not allowed to be attached) server.js
Please, add option to disable live reloading. Thanks.
The text was updated successfully, but these errors were encountered: