Skip to content

Commit

Permalink
in support of Node 10 + Chef
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Foley committed Jun 11, 2018
1 parent c15dfaa commit bd81d44
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 708 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CODE_GET=cat $(CODE_FILE)


.PHONY: \
install \
init clean build lock edit \
server server-debug server-production \
test test-debug \
Expand All @@ -52,6 +53,12 @@ CODE_GET=cat $(CODE_FILE)

# Build steps

# https://github.com/npm/npm/issues/3497
# npm postinstall "npm WARN cannot run in wd"
# because sudo
install:
@npm install --unsafe-perm

init:
@mkdir -p build

Expand Down Expand Up @@ -230,6 +237,9 @@ gh-pages: init

@rm -rf build/gh-pages

view-gh-pages:
@open http://cantremember.github.io/node-sleepbot-cgi/


# `npm run <TARGET>`

Expand Down
20 changes: 11 additions & 9 deletions bin/app.mjs
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
#!/usr/bin/env node
/* istanbul ignore file */
/* eslint-disable no-console */

/*
#!/usr/bin/env node -r esm
https://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-for-awk-with-a-shebang-i-e
"... everything after the path of the shebang gets parsed to the program as one argument."
so that's a problem ... we can't self pre-load ESModules
better alternatives going forward
`make server`
`/bin/bash -c 'make server 2>&1 >> stdio.log'`
ENV
HTTP_PORT
WWW_ROOT
...
NODE_ENV
BLUEBIRD_DEBUG=1
NODE_CONFIG_DIR=./config
/etc/init.d
https://github.com/nodejitsu/forever
TODO
https://github.com/lorenwest/node-config
https://github.com/trentm/node-bunyan
*/
/* istanbul ignore file */
/* eslint-disable no-console */

import minimist from 'minimist';

Expand Down

0 comments on commit bd81d44

Please sign in to comment.