Building and Running the Sample App

Building and running the sample app locally is relatively straightforward.

Where to Get Help

If you run into any issues, you can create a Github Issue, or you can ask questions in our Community Forum.

Installing System Dependencies

Before you get started, you'll need the following prerequisites installed:

  • Local working directory.
    • Create a directory on your computer that will be used for MemberJunction work. We highly recommend that this repository is a clone of a remote git repository in your favorite git tool such as GitHub, Bitbucket, etc.
  • SQL Server Database created – can be Azure SQL Server or regular SQL Server.
    • Note: Azure SQL is currently recommended to avoid additional steps required to establish trust between a regular SQL connection and the server certificate.
  • Node version 20 or higher
  • npm version 9.6 or higher
  • Angular version 17
  • Typescript

Setting up MemberJunction

The sample app requires MemberJunction to be installed and configured for the databse that you'll be using beforehand. For documentation on how, refer to the MemberJunction docs

Setting up the Sample App

Setting up the sample app is simply performing a couple additional tasks ontop of setting up a MemberJunction instance:

  • Run the MJ_BASE_Structure.YYYY_MM_DD.sql SQL Script on the target databse found in the SQL Scripts/install folder
    • this file contains the DDL statements necessary to create the schemas, tables, views, and other database objects necessary. YYYY_MM_DD will be a specific date stamp and is different for each distribution. Your zip file will only contain one such MJ_BASE_Structure* file
  • Run the MJ_BASE_Dataset.YYYY_MM_DD.sql SQL Script on the target databse fold in the SQL SCripts/install folder
    • this file contains the data itself for the sample app metadata. Run this file after the Structure file has successfully run on your database.
  • Run CodeGen again to generate subclasses and local code for the sample app specific entities
    • Navigate to the CodeGen directory and run npm run start

If you successfully completed the above steps, you should be able to run the MJAPI followed by the sample app itself and view it in the browser. 👍


What’s Next

Once you have the sample app up and running locally, you can read about how to contribute to the repo.