当前位置:网站首页>pkg打包node工程(express)
pkg打包node工程(express)
2022-06-28 05:40:00 【Joey_Tribiani】
pkg打包node工程(express)
// Windows
pkg -t win package.json
// Linux
pkg -t l package.json
如果报错找不到 bin
就在 package.json 中添加
“bin”: “./bin/www”,
注意需要在 package.json 中配置 pkg 需要打包的静态文件目录
"bin": "server.js",
"pkg": {
"assets": [
"public/**/*",
"views/**/*"
]
}
配置静态文件目录后在使用这些目录的时候就要注意路径的问题了
app.use(express.static(path.join(__dirname, "public")));
// app.use(express.static("public"))
边栏推荐
- Comparison between relational database and document database
- 关系数据库与文档数据库对比
- bash install.sh ********错误
- 如何在您的Shopify商店中添加实时聊天功能?
- 函数栈帧的创建和销毁
- 中小型水库大坝安全自动监测系统解决方案
- Gee learning notes 3- export table data
- 【JVM】——JVM中內存劃分
- Concurrent wait/notify description
- A full set of excellent SEO tutorials worth 300 yuan [159 lessons]
猜你喜欢
随机推荐
Binder面试之:内存管理单元
1404. number of steps to reduce binary representation to 1
北斗三号短报文终端在大坝安全监测方案的应用
JSP
6. 毕业设计温湿度监控系统(ESP8266 + DHT11 +OLED 实时上传温湿度数据给公网服务器并在OLED显示屏上显示实时温湿度)
jsp连接oracle实现登录注册(简单)
【JVM】——JVM中內存劃分
Relevant implementation records of CSI and local disk
Data warehouse: DWS layer design principle
5G网络整体架构
[JVM] - memory partition in JVM
Comparison between relational database and document database
Filecoin黑客松开发者大赛
Important basis for ERP software company selection
What does mysql---where 1=1 mean
Concurrent wait/notify description
Zzuli:1072 frog climbing well
Determine whether an attribute exists in an object
电商转化率这么抽象,到底是个啥?
A full set of excellent SEO tutorials worth 300 yuan [159 lessons]







![RL practice (0) - and the platform xinchou winter season [rule based policy]](/img/dc/10d615c64123475fea180e035095ff.png)
