I'd say rails because the nodejs + PHP codebases I've seen aged poorly, but the rails one are still clean. The problem with node is that things move too fast. What was beautiful in JS 4 years ago now looks like legacy mainframe fortran. Laravel (a popular php framework) is nice at one point in time, but even 0.x.0 migrations will break you application and force you to work for hours...