Skip to content

Build System

Yichao Yu edited this page Jan 20, 2021 · 2 revisions

We use cmake to manage the compilation and installation of the server. We use cmake to manage nodejs in the following ways.

  • Find NodeJS executable.

  • Initialize and update installed packages (thin wrapper around npm)

  • Manage addon

  • Setup test environment

  • Next.js deployment

    Next.js needs to be "compiled" for deployment out of the development environment. We use a script (cmake/deploy_next.sh) to make sure this is built to the directory we want and do on-demand recompilation based on the git status. (These settings are set in environment variables which are read by our next.config.js since Next.js does not seem to provide a builtin environment variable for this). Our install command then installs all the necessary js source code, the compiled addon and the compiled/deployed Next.js/webpack result to the target directory.

  • DEB Package

    We'll use cpack to create debian package. ArchLinux package should be fairly easy to make.

Clone this wiki locally