Hacker News new | past | comments | ask | show | jobs | submit login

>No it doesn't. There's a similar high level API, but that's it. Serving static files is part of snap-core, and done with serveDirectory/serveFile. Templates are part of the higher level snap module, and can be served in a similar style using heistServe.

https://github.com/snapframework/snap/blob/master/src/Snap/S...

While not strictly static, the heist snaplet silently adds a route that unconditionally serves templates in a fashion similar to a static serve.




It isn't "not strictly static", it literally has absolutely nothing at all to do with static content in any way. The heist snaplet adds a default "if nothing else matches, look for a template" route if you use the initialization function that says "sets up routes for all the templates". If you don't want that, then use the initialization function that doesn't do so (heistInit' which is right below heistInit in the docs, and linked to by the doc string of heistInit).

That seems like a really odd thing to try to characterize as "weirdly implemented".




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: