Files
WebFTP/.agent/workflows/build_backend_exe.md
backuppc c485f411b3 ..
2026-01-19 11:40:55 +09:00

1.2 KiB

description
description
Build the backend proxy server as a standalone .exe file

Build Backend Executable

This workflow explains how to package the Node.js backend (backend_proxy.cjs) into a standalone executable file (.exe) using pkg.

Prerequisites

  • Node.js installed
  • npm installed

Steps

  1. Install pkg globally (if not already installed):

    npm install -g pkg
    
  2. Build the executable: Run the following command in the project root (c:\Data\Source\SIMP\WebFTP):

    pkg backend_proxy.cjs --targets node18-win-x64 --output webzilla-backend.exe
    
    • --targets node18-win-x64: Targets Node.js 18 on Windows 64-bit. Adjust as needed (e.g., node18-macos-x64, node18-linux-x64).
    • --output webzilla-backend.exe: The name of the output file.
  3. Run the executable: Double-click webzilla-backend.exe or run it from the terminal to start the server.

Notes

  • The executable will include the Node.js runtime and your script, so no external Node.js installation is required for the end user.
  • Configuration files will still be stored in the user's AppData/Home directory as defined in the script.