Search code examples
erlangejabberdejabberd-module

Query ejabberd from a http server


  • I have a mnesia database
  • Database has a table with lots of records.

  • I want to get all the records from this table from a node.js server via rest api (http request)

For eg.

  • Node.js server sends a http request to ejabberd server to query that table
  • Ejabberd server returns all the records to node.js server.

How can I go this?


Solution

  • Maybe there is some command that already provides that information, so with ReST you can execute that command.

    Alternatively, you can store that information in a SQL database, where probably you already know or can find examples to get the information easily.