Как скомпилировать ноду в ехе вместе с html? Сервер запускает сайт, через node script.js работает, если скомпилировать pkg script.js то когда заходишь на сайт пишет что html не добавлен в exe
cardholder, ну я в нём этого pkg полазил, там так, отдаленно намекают что и как, но прямого объяснения что и где прописать нету :/
To compile a Node.js script into an EXE file, you can use a tool like pkg. pkg is a command-line tool that can be used to create standalone executables from Node.js scripts. Here is an example of how you can use pkg to compile a Node.js script into an EXE file: Install pkg by running the following command: npm install -g pkg Code npm install -g pkg Create a Node.js script that you want to compile into an EXE file. Compile the script into an EXE file using pkg. For example: pkg script.js Code pkg script.js This will create an EXE file called "script.exe" that includes the Node.js script. When you run the EXE file, it will execute the Node.js script. Note that pkg can only include static files like HTML, CSS, and JavaScript in the EXE file. If you need to include other types of files (e.g. images, audio, etc.), you will need to use a different approach. One option is to use a tool like electron-packager, which can package a Node.js app into a standalone executable that includes all necessary files.