Coder Social home page Coder Social logo

discord-pm2-anlatim's Introduction

Pm2 Basit anlatım

Herkese selam dostlar

  • PM2 sistemine yeni yeni geçmiş bulunmaktayım ve bunu müzik botlarında denemek istedim başlangıç olarak
  • Sizin le paylaşmak ve sizinde öğrenmeniz açısından
  • Basitçe konuya geçelim PM2 nedir veya nasıl çalışır.
  • PM2 sizin kullanmış olduğunuz pc niz veya vds inizi Web host gibi kullanmanıza olanak sağlıyan sistemdir.

Kullanım

  • Kullanmak istediğiniz botları node modüllerini SHIFT + MAUSE RIGHT kısayolunu yaparak modüllerini indiriniz.
  • Sonra ecosystem.confi.js dosyası oluşturunuz kısaca şöyle

Screenshot_1

  • Sonra yapmanız gereken şey klasörlerin main dosyalarını ecosystem.config.js dosyasında belirtmek oda şu şekilde.
module.exports = {
    apps: [
      {
        name: "null-invite",
        namespace: "null Bots",
        script: 'null.js',
        watch: false,
        exec_mode: "cluster",
        max_memory_restart: "500M",
        cwd: "./null-invite"
      },
]
};

Sistemi Çalıştırma

  • Bütün config ve sistemleriniz hazır ise botların bulunduğu klasöre SHIFT + MAUSE RIGHT kısayolunu kullanarak CMD açınız ve
  • npm init -y komutu ile temiz bir package.json dosyası oluşturun.
  • sonra npm i pm2@latest -g yazınız indirme işlemi bittikten sonra ise.
  • pm2 start yazmanız yeterli olucaktır.

Screenshot_2

VDS kullanıyorsunuz !!!

  • Bütün config ve sistemleriniz hazır ise botların bulunduğu klasöre SHIFT + MAUSE RIGHT kısayolunu kullanarak CMD açınız ve
  • npm init -y komutu ile temiz bir package.json dosyası oluşturun.
  • sonra npm i pm2@latest -g -s yazınız indirme işlemi bittikten sonra ise.
  • pm2 start yazmanız yeterli olucaktır.

Sistemi kapatma

  • Sikerim böyle sistemi falan derseniz ve kapatmak isterseniz
  • pm2 kill komutunu yazmanız yeterli olucaktır.

Loglar nerde amk

  • PM2 de logları görüntülemek için masa üstünde SHIFT + MAUSE RIGHT kısayolunu kullanarak CMD açınız
  • ve ardından pm2 logs komutunu yazınız.

Screenshot_3

Sevigilerle kalın

discord-pm2-anlatim's People

Contributors

this-null avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.