简体   繁体   English

在共享开发环境上使用node.js进行团队开发

[英]Team development with node.js on a shared dev environment

How does one do team development with node.js when all the developers develop on the same dev machine? 当所有开发人员都在同一台开发机上进行开发时,如何使用node.js进行团队开发?

Right now the dev server setup has nginx and apache. 现在,开发服务器的安装程序具有nginx和apache。 Developers SSH into the dev server and they have their own subdomained sandboxes to work on (database is shared). 开发人员通过SSH进入开发服务器,他们具有自己的子域沙箱(可共享数据库)。 They hack their code and they check into the SVN repo. 他们破解了他们的代码,并签入了SVN存储库。 Great, works fine....until we started using node.js. 太好了,工作正常。...直到我们开始使用node.js。

It seems node is not like apache or nginx where there's an independent server that serves up code. 似乎node不像apache或nginx,那里有一个独立的服务器来提供代码。 In node, the server AND the app code is tied together, so what happens is each developer will need to start and stop the server when changes are made. 在节点中,服务器和应用程序代码绑定在一起,因此发生的情况是每个开发人员在进行更改时都需要启动和停止服务器。 This creates a problem if one instance is started, it blocks the port for other developers. 如果启动一个实例,则会产生问题,从而阻塞其他开发人员的端口。

I'm also having trouble figuring out how to put the node code into the same SVN repository as the PHP app code. 我也很难弄清楚如何将节点代码与PHP应用程序代码放入同一SVN存储库中。

A friend told me the developers can do "timesharing" where the node code can only be modified by someone in a specific timeframe. 一位朋友告诉我,开发人员可以进行“分时”,其中节点代码只能由特定时间范围内的人员修改。 Not sure if this process is scalable. 不确定此过程是否可扩展。

Another option is to have everyone work locally off their computer with a VM copy of the dev server so they can develop independent of the dev server. 另一种选择是让每个人都可以使用开发服务器的VM副本在本地计算机上工作,以便他们可以独立于开发服务器进行开发。 This requires a lot of infrastructure change and I'm not ready to do that yet. 这需要大量的基础架构更改,而我还没有准备好这样做。

Any suggestions on how to do this with the current shared dev environment setup? 关于如何使用当前共享的开发环境设置执行此操作的任何建议?

Also, the reason why we are using node.js is to have good comet support. 另外,我们之所以使用node.js是为了获得良好的彗星支持。 But if this is becoming a blockage to our current infrastructure, I'm willing to try other technologies and servers that is similar to how nginx or apache works--so that it is independent of the app code and can be compatible with our current development environment. 但是,如果这成为我们现有基础架构的障碍,我愿意尝试其他类似于nginx或apache的工作方式的技术和服务器-使其独立于应用程序代码并且可以与我们当前的开发兼容环境。

PS. PS。 I tried the nginx http push module. 我尝试了nginx http push模块。 It's not well-maintained and not many updates. 它维护得不好,更新也不多。 Scared to use it in production. 害怕在生产中使用它。

您可以让每个开发人员的Node.JS实例在不同的端口上运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM