1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Best way to communicate with an database

Discussion in 'Development' started by SkyZone, Aug 7, 2018.

  1. SkyZone

    SkyZone Slime

    Messages:
    95
    I want to create an plugin which acts as an async API for MongoDB queries, but I dont really know how i should do this. Can anybody tell me the best way please?

    Thanks!
     
    Muqsit likes this.
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Plugins should not be APIs. If you want to make a library, create a virion.
     
    HimbeersaftLP and Muqsit like this.
  3. SkyZone

    SkyZone Slime

    Messages:
    95
    how can i load the virion then?
     
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Read the virion documentation. I linked above.
     
  5. SkyZone

    SkyZone Slime

    Messages:
    95
    I read it, but i dont know how to load virions without DEVirion, but you told, it should only be used for debugging.
     
  6. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Virion is the framework that injects libraries into a plugin. In production, your plugin should be compiled into a phar, and the virion would be injected into the compiled phar and the whole plugin will be shaded with the virion. See https://github.com/poggit/support/blob/master/virion.md#compiling-a-virion-user-without-poggit for procedure.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.