Here’s a step-by-step guide to turn your test project into a Node package that you can publish and reuse.
If you want to publish:
Go to URL - https://www.npmjs.com/signup and register.
Copy below command
npm login
Step #3: Publish your package:
npm publish