#!/bin/bash
cd /home/z/my-project
while true; do
  NODE_OPTIONS="--max-old-space-size=384" node node_modules/.bin/next dev -p 3000 2>&1
  echo "SERVER DIED AT $(date), RESTARTING..." >> /home/z/my-project/dev-restart.log
  sleep 5
done
