Integration Options for Node.js SDK in Containers and VMs
Step 1: Install the @thundra/core package
1
npminstall @thundra/core --save
Copied!
Step 2: Add Thundra Express middleware
After installing the @thundra/core module, you will need to add Thundra Express middleware to your application. Thundra will monitor your application automatically.
app.js
1
const thundra =require("@thundra/core");
2
const express =require('express');
3
​
4
const app =express()
5
app.use(thundra.expressMW());
6
​
7
app.get('/',function(req,res){
8
res.send("Response")
9
});
10
app.listen(3000)
Copied!
Step 3: Add Thundra API Key
Set the thundra_apiKey environment variable to the API key value you got from the Thundra console.