Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit e736f85

Browse files
DaneTheoryigorklopov
authored andcommittedApr 27, 2019
Fix pkg example express app (#668)
* Fix pkg example express app Currently, following the instructions provided in the README result in pkg failing to build the executable. The error output references "node7" as being an undefined target in package.json. pkg relies on pkg-fetch for retrieving Node versions to be used as targets in building executables. As of pkg-fetch v2.5, no node v7.x.x is listed as an available source. Changing "node7" to "node10" fixes this issue as it is available via pkg-fetch v2.5. Additionally, this PR: *) Adds files/folders to .gitignore related to the example express app which should not be included in master. *) Improves README ducumentation for example express app. * Revise example app node target version Changed `pkg` target from `node10` to `node8` in order to pass CI build errors due to missing peer dependency for babel at that version.
1 parent 619fc78 commit e736f85

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed
 

‎.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,13 @@
66

77
# logs
88
npm-debug.log
9+
10+
# General macOS
11+
.DS_Store
12+
examples/.DS_Store
13+
14+
# Example pkg'd application
15+
examples/express/express-example
16+
17+
# Example dependencies
18+
examples/express/node_modules

‎examples/express/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"views/**/*"
1111
],
1212
"targets": [
13-
"node7"
13+
"node8"
1414
]
1515
}
1616
}

‎examples/express/readme.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
Run `pkg .` here!
1+
# Express-Example
2+
3+
> This example illustrates using `pkg` on a simple Express based app
4+
5+
## Instructions
6+
7+
1. Run `npm install`
8+
2. Run `pkg .`
9+
10+
That's it!
11+
12+
## Post Success Notes
13+
14+
* Upon success, `pkg` will create an executable named "express-example". This file can be found at the root of the example project directory.
15+
* To see the app in action, run the executable then navigate to http://localhost:8080/ in your browser.

0 commit comments

Comments
 (0)
This repository has been archived.