Make a .deb for a Node.js application

How I make a .deb for a Node.js application that installs Node.js and its required npm modules on dpkg -i?

Which is the place in the filesystem where I have to put this application? (/opt,/usr/local).

Thanks in advance.


Solution 1:

Here's an article + screencast on the subject:

How to create a .deb for NodeJS apps