1

I am working on SAP cloud foundry environment(Pass) where its architecture is micro services. So I want to build two application using node and deploy them in SAP cloud foundry platform.

The problem or confusion I am facing is, I have some custom helper code in helper.js file that is very useful in both of my node application and I do not want to keep the same code of helper.js file in both the application. So as a alternative I found the below things 1.create a private package 2.use exports(but this works only for files inside a module and not between modules)

Please help me if there's any other may to do it and if not help me understand on creating private package in npm and how can have my own org/user private registry.

user10778951
  • 31
  • 10
  • if it is really important you can use private npm registry using nexus repository manager, and push helper.js as module and include as an npm package. that would also help if you may have such other modules in future. – Harsh Vishwakarma Sep 22 '20 at 10:27
  • I use nexus as my private package manager, this tutorial is very useful: https://blog.sonatype.com/using-nexus-3-as-your-repository-part-2-npm-packages – Luis Gonzalez Sep 22 '20 at 16:51

0 Answers0