This repository has been archived on 2024-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
hedera/docs/reference/hedera/running.xml

64 lines
2.5 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="running">
<refmeta>
<refentrytitle>Running applications</refentrytitle>
<manvolnum>0</manvolnum>
<refmiscinfo>Hedera Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Running Hedera applications</refname>
<refpurpose>
How to run an Hedera application
</refpurpose>
</refnamediv>
<refsection id="description">
<title>Custom modules</title>
<para>
To run your own modules you need to install them in the
search directories of Hedera. You can use
<command>pkg-config</command> to know where these directories
actually are in your installation:
<programlisting>
pkg-config --variable=modulelibdir hedera
pkg-config --variable=moduledatadir hedera
pkg-config --variable=modulequerydir hedera</programlisting>
</para>
<para>
It is also possible to put your files in any other path and tell
Hedera where to look for them. To do so, set the following
environment variables before executing Hedera:
<envar>VN_MODULE_LIB_PATH</envar>,
the list of directories put in this variable will be used to look
for the binary files of the module;
<envar>VN_MODULE_DATA_PATH</envar>, this list
of directories must hold the path to the data of the module;
<envar>VN_MODULE_QUERY_PATH</envar>, this variable is not
always needed, but if the
module has any form that uses a file to pass the SQL queries to the
database, this file has to be under a directory named after the
module, this directoy has to be inside one of the paths listed in
this variable.
</para>
<title>Example modules</title>
<para>
Once you've succesfully compiled the library you can try and
run some of the provided modules (some of which you can write
by yourself following the tutorials included in this manual).
If the installation went as expected, you'll just need to
run the Hedera executable. The executable will be in the
<filename>bin</filename> directory of the installation tree. If you
installed the library in a folder that is included in the
<envar>PATH</envar> environment variable, you'll just need to write
<command>hedera</command> in the command line. The library will load
the modules at runtime. The details on how to tell the hedera
execution environment where to look for your modules are explained
in <link linkend="adding-modules">Adding Modules</link>.
</para>
</refsection>
</refentry>