1.2 KiB
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
npminstalled
Steps
-
Install
pkgglobally (if not already installed):npm install -g pkg -
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.
-
Run the executable: Double-click
webzilla-backend.exeor 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.