This repository hosts the website for the Training and Placement Cell of IIIT Kottayam.
To host this website, you’ll need:
- Node.js (version 18 or above)
- NPM
- Git
- PM2 (for process management)
- GitHub Webhook (for automated deployment on code changes)
git clone https://github.com/Aroson1/IIITK-Placement-Website.git
cd IIITK-Placement-Websitenpm installTo build the project for production, run:
npm run buildTo host the application using PM2 and enable auto-deployment on changes to the main branch:
sudo npm install -g pm2pm2 start npm --name "placement-site" -- start- Go to your GitHub repository’s Settings > Webhooks.
- Click Add webhook.
- Set Payload URL to
http://<server-ip>:9000/webhook(replace<server-ip>with your server’s IP). - Set Content type to
application/json. - Select Just the push event.
- Click Add webhook.
Run the webhook listener using PM2 to keep it running in the background:
pm2 start webhook.js --name "webhook-listener"