If you have a server running legacy Java code, especially implementing abstract classes and interfaces, it would be much easier to adopt the Java Spring Framework, however, if you are starting from scratch or adding to an existing NodeJS codebase, ExpressJS would be easier to get going. I suggest to use helmet.js in conjunction with ExpressJS apps. https://github.com/helmetjs/helmet