From 24615e069f9b26256235bc4ad1a8b31cbd22dfb1 Mon Sep 17 00:00:00 2001 From: John Bintz <27256+johnbintz@users.noreply.github.com> Date: Fri, 10 Apr 2020 09:13:08 -0400 Subject: [PATCH] PR tweaks --- .sandstorm/sandstorm-pkgdef.capnp | 1 - .sandstorm/setup.sh | 4 ++-- README.md | 2 +- server.js | 8 +++++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index cdf9b4d..0362443 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -244,7 +244,6 @@ const myCommand :Spk.Manifest.Command = ( (key = "SANDSTORM", value = "1"), (key = "HOME", value = "/var"), (key = "NODE_ENV", value = "production"), - (key = "NODE_DEBUG", value = "fs"), # Export SANDSTORM=1 into the environment, so that apps running within Sandstorm # can detect if $SANDSTORM="1" at runtime, switching UI and/or backend to use # the app's Sandstorm-specific integration code. diff --git a/.sandstorm/setup.sh b/.sandstorm/setup.sh index d2349c6..9bda403 100755 --- a/.sandstorm/setup.sh +++ b/.sandstorm/setup.sh @@ -12,8 +12,8 @@ apt-get update apt-get install -y git strace # First, get capnproto from master and install it to -# /usr/local/bin. This requires a C++ compiler. We opt for gcc-6 -# because that's what capnproto now requires. +# /usr/local/bin. This requires a C++ compiler. We opt for clang +# because that's what Sandstorm is typically compiled with. if [ ! -e /usr/local/bin/capnp ] ; then sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q clang autoconf pkg-config libtool cd /tmp diff --git a/README.md b/README.md index c830eb1..a6c8800 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Hugo Sandstorm package This is the [Sandstorm](https://sandstorm.io) package of [Hugo](https://gohugo.io/). -The version of Hugo in this build is 0.68.3. +The version of Hugo in this build is 0.69.0. ## Development diff --git a/server.js b/server.js index 5605ff3..f649b81 100644 --- a/server.js +++ b/server.js @@ -1,10 +1,10 @@ import Nuxt from "nuxt" import logger from "morgan" import fs from 'fs' -const exec = require("child_process").exec -const execFile = require("child_process").execFile import Express from "express" import gitBackend from "git-http-backend" +// TODO: once Caddy 2 or something similar is in place, reinstate the +// admin proxy. //import httpProxy from "http-proxy" const spawn = require("child_process").spawn @@ -20,6 +20,9 @@ app.set("port", port) app.get("/publicId", (req, res) => { const sessionId = req.headers["x-sandstorm-session-id"] let allData = "" + // TODO: figure out why Cap'n Proto keeps crashing when + // getPublicId exits so we can get rid of this weird + // memoization hack I had to do! const file = `/var/publicid-${sessionId}` const handleResult = () => { @@ -94,7 +97,6 @@ app.use(nuxt.render) if (config.dev) { nuxt.build() .catch((error) => { - console.log('whoa') console.error(error) // eslint-disable-line no-console process.exit(1) })