Open Source licenses have different scopes and different impacts, that's why there are so many different licenses. You will have to look at each of the licenses separately. Most obligations for you would only be triggered as soon as you distribute your software, some if you modify any code of libraries, some if you combine components of one (copyleft) license with other components with different licenses.
Your question is very generic, therefore you have to check how it applies to your situation and the specific npm packages you use.
For a backend server, which is under your control and where the code is not distributed to others, the use of OSS does not count as 'distribution', so you will not have to comply with respective obligations in the licenses. However, if your backend server is also serving 3rd parties, then you will need to check if you have included code which is under the AGPL or similar licenses.
For the frontend server you have to consider 2 separate cases: a) code which only runs on the server; and b) code which is sent to the browser of the client.
For a) similar considerations apply as for the backend server.
For b) you have to carefully consider all aspects of the OSS licenses. Not only HTML/XML code is affected here, but also Javascript, databases, images, text, etc. Depending on the license language you will have to identify the authors/copyright holders, provide a copy of the license language and possibly of Notice files (you can easily do that in an 'About' page on your frontend server). Even if some of that information is included in the headers of the files you are distributing, this is not the place where 'normal users' would search for it, and often it is incomplete (license language and/or notice files missing). You will also have to check the license compatibility of the different components. Some licenses don't go well with each other (see for example this page).