pathlist
This setting is not used for locating Profound.js modules or files when running an application in a Workspace. In that case, only modules and files within the Workspace directory or a subdirectory can be used, and paths within a subdirectory must be specified relative to the Workspace directory. If a program in a Workspace is called via PJSCALL or a proxy program, the IBM i library list is used to search for modules and files.
If using a subdirectory in a workspace, the workspace name and the nested directories must be added to the pathlist for this to work. For example, add an entry such as /workspaceName/folder1/folder2/.
Description
This property provides the default pathlist. The pathlist is specified as an array of directories to search:
pathlist: [ "dir1", "dir2", "dir3" ]The concept of a pathlist is similar to a library list in an IBM i job.
How the Pathlist Is Used
The pathlist searches directory paths for Node.js modules within the modules directory of the Profound.js instance. It is used by APIs such as pjs.call() when a module name is unqualified.
When calling a module via a URL alias on a Profound.js instance installed on an IBM i system, the pathlist is also used to locate database files within libraries: the module treats the pathlist entries as if they were libraries in a library list. Using the pathlist in the example above, the module has access to files in the dir1 library, if that library exists, without using qualified file names.
Behavior in Genie
When Profound.js modules are called from Genie, the pathlist is inherited directly from the library list of the Genie job and the pathlist configuration setting is ignored.
If the appendPJSPathlist option is enabled in config.js, the pathlist inherited from the library list is instead appended onto the
pathlistconfiguration when using Genie, so modules are searched for in the configured pathlist before the library list. This does not affect regular pathlist usage.
For information on how to modify this setting, see Configuration File.