In an MVC framework where should we put our NODE.js files?

微信扫一扫,分享到朋友圈

In an MVC framework where should we put our NODE.js files?

I have a PHP framework. Recently I’ve put some burden on NODE.js
shoulders. Now I don’t know where to put node.js
files. For now I have one file, but It’ll get bloated in the near future. Where do you suggest to put these files?

Thanks in advance.

EDIT :

I’m asking to see if putting nodejs files inside the php framework best practice. Or should we put all nodejs file in www folder without ever caring about our PHP framework.

Problem courtesy of: ALH

Solution

You shouldn’t put your node.js
code in any web accessible folder (like www), as this is server code and it shouldn’t be accessible from the web.

Your best bet is to just make another directory to host your node.js
application which isn’t in www or any other web accessible directory.

Solution courtesy of: Munim

rabbitmq死信队列详解与使用

上一篇

恕我直言,有了这款IDEA插件,你可能只需要写30%的代码...

下一篇

你也可能喜欢

In an MVC framework where should we put our NODE.js files?

长按储存图像,分享给朋友