There is a hack, however, which allows you to initiate the process as root using sudo, but de-escalate the privileges later by setting the user and group identity of the process to the user/group who issued the sudo command. We do this by using the environment variables SUDO_UID and SUDO_GID, and setting them using process.setgid and process.setuid:
app.listen(process.env.SERVER_PORT, async () => { const sudoGid = parseInt(process.env.SUDO_GID); const sudoUid = parseInt(process.env.SUDO_UID); if (sudoGid) { process.setuid(sudoGid) } if (sudoUid) { process.setuid(sudoUid) } ...});