File tree Expand file tree Collapse file tree 2 files changed +13
-20
lines changed Expand file tree Collapse file tree 2 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ function getStatus()
2727
2828 retVal [ "success" ] = true ;
2929 retVal [ "version" ] = process . versions [ "v8" ] + " (node.js " + process . versions [ "node" ] + ")" ;
30+ retVal [ "timestamp" ] = new Date ( ) . toISOString ( ) ;
31+ retVal [ "lastmod" ] = process . env [ 'LASTMOD' ] || '(not set)' ;
32+ retVal [ "commit" ] = process . env [ 'COMMIT' ] || '(not set)' ;
33+ retVal [ "tech" ] = "NodeJS " + process . version ;
3034 retVal [ "__filename" ] = __filename ;
3135 retVal [ "os.hostname" ] = os . hostname ( ) ;
3236 retVal [ "os.type" ] = os . type ( ) ;
@@ -117,7 +121,7 @@ function serveStatus(query, response)
117121 "Content-Type" : "text/plain" ,
118122 'Access-Control-Allow-Origin' : '*' ,
119123 'Access-Control-Allow-Methods' : 'POST, GET' ,
120- 'Access-Control-Max-Age' : '604800' ,
124+ 'Access-Control-Max-Age' : '604800'
121125 } ) ;
122126
123127 var params = parseParams ( query ) ;
Original file line number Diff line number Diff line change 22#
33# deploy the js backend to Zeit
44#
5- # https://zeit.co/docs/features/now-cli
65
7- #
8- # list existing instance
9- #
10- now list regexplanet-js
11-
12- #
13- # deploy new one
14- #
15- now --public && now alias
6+ set -o errexit
7+ set -o pipefail
8+ set -o nounset
169
17- #
18- # move alias to new one
19- #
20- # now alias greek normal
21-
22- #
23- # delete old one
24- #
25- # now rm
10+ now \
11+ --env COMMIT=$( git rev-parse --short HEAD) \
12+ --env LASTMOD=$( date -u +%Y-%m-%dT%H:%M:%SZ) \
13+ && now alias \
14+ && now rm $( cat ./now.json | jq ' .name' --raw-output) --safe --yes
You can’t perform that action at this time.
0 commit comments