Server-side console.log prompt for creating a new template


#1

I would like to have a server-side console.log prompt, so whenever iron router at client returns “Couldn’t find a template named “/name” or “name”. Are you sure you defined it?” server-side would prompt a question that Couldn't find a template named /name" or "name". Are you sure you defined it? Would you like to create one y/n?

Is this possible someway?


#2

For sure you can hook into the iron-router error events and trigger your own meteor methods to create log messages on the server console.

It doesn’t sound like it could be possible though to pause the meteor application and prompt you for the creation of the missing template. Not considering yet that meteor can’t know where exactly you want to place your template.
It sounds like you could write a small cli tool that scans your router files and template folder(s) and reports back if templates are missing (and of course create those if you want it).