To begin this tutorial, we install sample data to work with and create the skeleton of our file-based module, the three empty directories:
  • queries - Holds SQL queries and views.
  • reports - Holds R reports.
  • views - Holds user interface files.

Set Up a Dev Machine

Complete the topic below. This will set up a machine that can build LabKey Server from source.

Install Sample Data

Create Directories

  • Go to the server/modules/ directory, and create the following directory structure and standard file:
│ build.gradle

Add the following contents to

Module Class: org.labkey.api.module.SimpleModule
Name: ReportDemo

Add the following contents to build.gradle:

apply plugin: 'java'
apply plugin: 'org.labkey.fileModule'
  • In the settings.gradle file in the root of your enlistment, add the following line:
include ":server:modules:reportDemo"

Build the Module

  • In a command shell, go to the module directory.
  • Call 'gradlew deployModule' to build the module.
  • Restart the server to deploy the module.

Enable Your Module in a Folder

To use a module, enable it in a folder.

  • Go to the LabKey Server folder where you want add the module functionality.
  • Select (Admin) > Folder > Management.
  • Click the Folder Type tab.
  • Under the list of Modules click on the check box next to ReportDemo to activate it in the current folder.

Start Over | Next Step (2 of 5)


Was this content helpful?

Log in or register an account to provide feedback

expand all collapse all