javascriptMVC 和 Rails 文件夹结构
我最近开始开发一个需要大量脚本客户端的应用程序,并且一直在考虑将 Rails 与 JavascriptMVC 集成。发现 JupiterJS 的人们也在做同样的事情,这很棒,但是,
我一直在 google 上搜索 javascriptMVC 的论坛,但我仍然找不到明确的答案 - 我将所有 javascriptMVC 文件夹放在哪里& Rails 文件结构中的文件?
我最初打算将所有新的 javascriptMVC 文件放在 /public/javascripts/ 中 - 但我有点担心它可能带来的安全问题 - 所有测试文件、文档和脚本都将可供全世界访问。另外,javascriptMVC 中的说明说:
“专业提示:将这些文件解压缩到应用程序文件夹结构中尽可能高的位置(即,不要将它们放在公共目录中的 javascriptmvc 文件夹下)。”
所以现在我不确定。关于良好的 Rails + javascriptMVC 文件夹结构的外观有什么想法吗?我是否需要向 Rails 环境添加任何新路径以允许它在 public/ 之外工作?
I've recently started working on an app that needs heavy scripting client-side and have been looking at integrating Rails with JavascriptMVC. found out that the folks at JupiterJS are doing the same, which is great, but,
I've been searching on google, on javascriptMVC's forum and i still couldn't find a definite answer for this - where do i put all the javascriptMVC folders & files in the Rails file structure?
I was initially going to put all the new javascriptMVC files in /public/javascripts/ - but I was a little worried of the security issues it might pose - all the test files, docs and scripts will be available for access by the whole world. PLUS, the instructions in javascriptMVC says:
"PRO TIP: Unzip these files as high in your apps folder structure as possible (i.e. don't put them under a javascriptmvc folder in your public directory)."
so now I'm not sure. any ideas on how a good rails + javascriptMVC folder structure would look like and do I need to add any new paths to the Rails environment to allow it to work outside of public/ ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 JMVC 问题,请在我们的论坛上提问。你很幸运,我检查了 stackoverflow。
如果您使用标准 Rails 服务器,则并不存在真正的安全问题。然而,如果你想安全,在你的生产机器上,你只需要推出steal/steal.js以及你的应用程序的Production.js和Production.css文件。
For JMVC questions, Please ask questions on our forum. You're lucky I check stackoverflow.
There isn't really a security issue if you're using a standard rails server. However, if you want to be safe, on your production machine, you only have to push out steal/steal.js and your apps production.js and production.css file.