Converting a JavaScript application into a module has a number of advantages. For example, the application source can be checked into a source control environment, and it can be distributed and deployed as a module unit.

The jstutorial.module file shows how to convert two of the application pages (reagentRequest and confirmation) into views within a module. The .module file is a renamed .zip archive. To unzip the file and see the source, rename it to "", and unzip it.

To deploy and use the .module file:

  • Download jstutorial.module
  • Copy jstutorial.module to the <LK_ENLISTMENT>/build/deploy/externalModules directory of your LabKey Server development installation.
  • The module will be automatically deployed to the server when you restart it.
  • Enable the module in some folder.
  • Navigate to the folder where you want to use this reagent request form.
    • Note that the folder needs to contain a "Reagents" list to populate the lookup.
  • Edit the end of the URL to read:
  • For example, on a development machine where <path_to_folder> is the entire path to the folder, it might look like:
  • You'll see the form at the end of your edited URL.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all