Sırası ile verdiğim kodları kurun
npm install -g pm2
nano wai.config.js
module.exports = {
apps : [{
name: 'wai-node', // A name for your process
script: 'wai', // The command to run
args: 'run', // Arguments for the command
instances: 4, // Updated number of instances Kac tane kopya calistirmak istiyorsun
autorestart: true, // Automatically restart if it crashes
watch: false, // Don't watch for file changes to restart
max_memory_restart: '1G', // Restart if memory usage exceeds 1GB (adjust as needed)
// Combine all environment variables into a single env block
env: {
NODE_ENV: 'production',
W_AI_API_KEY: 'websitesinden aldığın api'yi buraya gir'
}
}]
};
çalıştırmak için
pm2 start wai.config.js
loglara bakmak için :
pm2 logs wai-node
Buda durdurmak için
pm2 stop wai.config.js
İnanın ilk günden bunu öğrenmiş olsam milyonlarca elimde wai olurmuş