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

Commit

Permalink
Fix pkg example express app (#668)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
DaneTheory authored and igorklopov committed Apr 27, 2019
1 parent 619fc78 commit e736f85
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@

# logs
npm-debug.log

# General macOS
.DS_Store
examples/.DS_Store

# Example pkg'd application
examples/express/express-example

# Example dependencies
examples/express/node_modules
2 changes: 1 addition & 1 deletion examples/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"views/**/*"
],
"targets": [
"node7"
"node8"
]
}
}
16 changes: 15 additions & 1 deletion examples/express/readme.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
Run `pkg .` here!
# Express-Example

> This example illustrates using `pkg` on a simple Express based app
## Instructions

1. Run `npm install`
2. Run `pkg .`

That's it!

## Post Success Notes

* Upon success, `pkg` will create an executable named "express-example". This file can be found at the root of the example project directory.
* To see the app in action, run the executable then navigate to http://localhost:8080/ in your browser.

0 comments on commit e736f85

Please sign in to comment.