#!/bin/bash

# Navigate to application directory
cd /opt/lambda-load-test

# Start application with PM2
pm2 start src/server.js --name lambda-load-test

# Save PM2 process list
pm2 save

# Set PM2 to start on system startup
pm2 startup systemd -u ec2-user --hp /home/ec2-user
