[Tools] Package Your node.js Projects Into a Standalone Applications with pkg
2023-09-14 09:00:47 时间
pkg allows you to take any of your node projects and bundle them up into standalone apps that you can ship to people or servers that do not have node.js installed. This lesson walks you through installing and using pkg on two simple projects.
Install:
npm i -g pkg
https://www.npmjs.com/package/pkg
index.js:
console.log("hello world")
Run:
pkg index.js --target macos --output hello-wrold
It will output a bash file to run:
./hello-world
相关文章
- Fabric.js 变换视窗
- 00. Node.js 的安装
- js数组转对象_js数组去重的四种方法
- node.js linux安装_node安装及环境配置
- Vue.js – 引入外部 JS 文件
- Node.js REPL模块
- 【学习笔记】黑马程序员Node.js全套入门教程 | 基础篇
- js按键记录
- 不影响开发体验,如何将单体 Node.js 变成 Monorepo
- 使用Node.js连接MySQL数据库(node-mysql)
- JS定义函数(function关键字)
- Node.js在Linux上的部署与使用(nodelinux部署)
- 数据Node.js实现MySQL数据的同步更新(node同步mysql)
- 为 Debian 安装最新版本的 Node.js
- Node.js与MongoDB:联手打造高效应用(node与mongodb)
- 利用Node.js封装MSSQL的尝试(node mssql封装)
- 使用Node.js链接/操作MS SQL数据库(node mssql使用)
- JS旋转图片阵类
- jquery.cookie.js操作cookie实现记住密码功能的实现代码
- js文本滚动效果的实例代码
- JS对话框_JS模态对话框showModalDialog用法总结
- node.js中的socket.io入门实例
- node.js中的buffer.fill方法使用说明
- node.js中的http.response.setHeader方法使用说明
- node.js中的fs.ftruncate方法使用说明
- node.js中的fs.lstatSync方法使用说明
- node.js中的fs.lchownSync方法使用说明