For example, if your original start command was next start, change it to:
"start": "NODE_OPTIONS='-r ./acquia-autoscaling.js' next start"
This ensures that the monitoring script runs before your application starts. It makesthe metrics available and enables us to scale your application based on these metrics.
Place NODE_OPTIONS='-r ./acquia-autoscaling.js' immediately before the main entry point command of the Node.js application as shown in the preceding example. Placing it elsewhere in the startup command does not enable autoscaling.
Note: Autoscaling is not enabled if the monitoring script is not configured
What are the key steps involved in enabling autoscaling for my application? | Acquia Product Documentation
Node JS
What are the key steps involved in enabling autoscaling for my application?