Feature request: "process templates" task

7 views
Skip to first unread message

mr....@gmail.com

unread,
Aug 9, 2015, 4:27:38 PM8/9/15
to apostrophenow
In apostrophe guides, the following is stated:

Tip: you will need to restart the node app when you make code changes, even in templates.

I guess that the templates require a server restart to process them and cache the result.

It would be a more streamlined development process, if the template processing would be executable without a server restart using a task.
If the caching process was occurring on-the-fly when first requested by clients, a similar behavior as PHP development, would be achieved (no server restart is required).

Is there a way to process the templates using some node call, without a server restart?

Thank you,
Arik.

Tom Boutell

unread,
Aug 10, 2015, 1:21:29 PM8/10/15
to apostr...@googlegroups.com
Hi Arik,

There are various tools to help you accomplish this which are external to Apostrophe itself. Check out nodemon:


However if you find your CPU is grinding really hard make sure your nodemon configuration is well thought out. For instance, you might tell it to ignore the node_modules folder, and manually restart in the rare cases where you install a new npm module.

This is an example of the separation of concerns in node. While PHP has everything built in, in node everything is out there as an npm module, for you to use if you actually want it.


--
You received this message because you are subscribed to the Google Groups "apostrophenow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apostropheno...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--


THOMAS BOUTELL, DEV & OPS
P'UNK AVENUE | (215) 755-1330  |  punkave.com
Reply all
Reply to author
Forward
0 new messages