开发者

Where should I put my static text files in order to be OTPy?

开发者 https://www.devze.com 2023-04-07 13:11 出处:网络
I\'m building a server with cowboy, and I\'ve got some static HTML pages that I want to serve. Is there开发者_JAVA百科 an OTP friendly place to put that sort of thing? Is there an established way to t

I'm building a server with cowboy, and I've got some static HTML pages that I want to serve. Is there开发者_JAVA百科 an OTP friendly place to put that sort of thing? Is there an established way to tell rebar where to look for this sort of thing?


If the pages are part of the application, then typically under the priv directory, for example priv/docroot or similar. I don't know about rebar, but in general, filename:join(code:priv_dir(?APPNAME), "docroot") could be used to compute the full directory name at runtime.

0

精彩评论

暂无评论...
验证码 换一张
取 消