Cirkus Serveri Forum
    • CoD4xAdmin
    • Recent
    • Popular
    • Groups
    • Users
    • Register
    • Login

    multiple apps

    Scheduled Pinned Locked Moved
    Support
    2
    3
    574
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • KlauserK
      Klauser
      last edited by

      Hey @NeHo I was trying to add a new app in the same machine, I change the port and it works if I run it with "npm start" but how can I run that second app with pm2?

      any idea thanks.

      1 Reply Last reply Reply Quote 0
      • NeHoN
        NeHo Administrators
        last edited by NeHo

        You can google pm2 tutorial how you can do it in a json config file

        Or you can do it like me, you can add for every app a unique name, navigate to the root of your app1 and start the application with with pm2 and name it

        pm2 start npm --name "mywebsite.com" -- start
        

        navigate to the root of the second app and start it with pm2

        pm2 start npm --name "mywebsite2.com" -- start
        

        if you list now your application you will have 2 instances runing, 1 will be named mywebsite.com and the other mywebsite2.com

        you can name it as you wish, i hope this helped you

        I keep hitting the 'Escape' key - but I'm still here. ...

        1 Reply Last reply Reply Quote 0
        • KlauserK
          Klauser
          last edited by

          Thanks dude.

          It worked like a charm. =D

          1 Reply Last reply Reply Quote 1
          • First post
            Last post

          0

          Online

          191

          Users

          268

          Topics

          1.2k

          Posts
          Powered & Designed by NeHo