I wrote a number of NodeJS modules (some of which are actually good, in my modest opinion). I basically forgot to set a license for them.
I would like to pick the AGPL (Affero GPL).
How do I do that? Can I just get away with a LICENSE file in the project? Or do I need a license disclaimer in every single file in the project? What about CSS?
3
NOTE: I am not a lawyer. If you are making business decisions, I recommend getting professional legal advise first.
In most cases, merely adding a LICENSE file to your project should be sufficient and is common convention in open source projects. If you are concerned, reference your LICENSE file from any documentation you have. You should not need to reference it from every file unless your license is restrictive or unusual and most open source licenses are neither.
That said, take a step back and ask why do you want to add a license? For example:
- Protect yourself by disclaiming any warranties.
- Control how others modify your software and distribute those modifications.
- Control whether others can resell or distribute your software.
- Appear more professional by specifying a license (don’t laugh, it happens).
If you are concerned about warranties, the worst case scenario is something taking you to court. You could consider professional indemnity and personal liability insurance but this is expensive but, without knowing your project, you would be extremely unlucky to need it.
If you are concerned about people copying or taking credit for your work, specifying a license may be insufficient. You could close source your software but this hard for JavaScript. You could also make the code publicly available so any blatant copying is easily found by a Google search but that defeats the purpose of using an open source licence.
In short, the big thing you want to do is control how others use and modify your code and the LICENSE file does not, by itself, prevent anyone from doing anything. What it does do is give you some legal and moral recourse if someone abuses it and making a reasonable effort to define that, such as adding a LICENSE file and referencing it from other documentation, is usually sufficient.
5