首页 > 解决方案 > Package web static site to exe nodejs

问题描述

I have static site with some file below:

Problem: I want to build an exe file to serve above file which should run on window.

When install exe file, program will run static site and other component can connect

Please suggest me a for me tool

标签: node.jspackagestatic-site

解决方案


您可以使用 Web 服务器构建节点应用程序,然后您可以使用模块express.js将代码和资产编译成 exe 文件pkg

使用 pkg 模块,您可以捆绑您的节点应用程序以在 windows、mac 或 linux 上运行。

要打包您的静态文件,pkg您需要将资产目录添加到package.json文档中提到的

"pkg": {
    "assets": "your-assets-dir/**/*"
}

请点击这些链接,

如果你想为你可以使用的 windows 制作安装程序,inno script studio


推荐阅读