Marko 1500ms & no refresh with browser-refresh

I’ve been trying the Marko templating engine and was seeing the message

Waited 1500ms without receiving "online" from child process

on starting up the app with either browser-refresh or with node server.js. Turns out that was just due to my MacBook Pro being old and slow. The tortoise still ran the code just not as quickly as expected.

The more significant problem I was facing was that

browser-refresh wasn’t doing a browser refresh

as intended when I changed source code. This was driving me nuts going round in circles trying to understand this new technology in a language in which I wasn’t particularly familiar. Magic was at work and the tricks weren’t quite working. Worse was I couldn’t work out how to fix them.

I asked on gitter.im about the problem and, much to my surprise and absolute delight, the author of Marko, Patrick Steele-Idem answered. What’s more he took the time to troubleshoot the problem. I was fairly sure it would be something simple but the troubleshooting went deep into the cache refresh mechanism – illuminating and ultimately fruitful. Case sensitivity was the problem – as simple as that! The cache was being cleared of a file with a lower case name in the path whilst the file being retrieved for the browser had mixed case. Answer: use lower case with underscore in paths and filenames (and I’m quoting Patrick Steele-Idem here).

Now I’m underway again trialling Marko as part of a possible technology stack I’m exploring.

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s