Snyk Documentation

Installing the Snyk runtime agent for Node.js

Add @snyk/nodejs-runtime-agent as a dependency to your project in order to start using Snyk Runtime Monitoring for your Node.js applications.

Configure the agent at the earliest point possible within the start sequence of the application code:
Ensure the Require statement for the agent is entered prior to all other require statements that you may add to the code.

projectId: '0462e42b-c92f-4b48-bac8-81eb3ff7f43e',

Example of Node.js code when Snyk runtime agent is added successfully

Related topics