Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Munzer committed Mar 18, 2017
1 parent a76eda8 commit b6e966d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions api-test-tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function create_app_container
$DOCKER create \
--security-opt label:disable \
-v $PERSISTANT_FOLDER/$APP_NAME/config.js:/app/config.js:ro \
--link $DB_NAME:mongo \
--name="$APP_NAME" \
--restart="on-failure:5" \
-e "VIRTUAL_HOST=$NODEJS_VHOST" \
Expand Down
6 changes: 0 additions & 6 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ app.use(function (req, res, next) {
// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
console.log("dev");
console.log(app.get('env'));
app.use(function (err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
Expand All @@ -84,10 +82,6 @@ if (app.get('env') === 'development') {
// production error handler
// no stacktraces leaked to user
app.use(function (err, req, res, next) {
console.log("no dev");
console.log(err.message);
console.log(err.status);
console.log(req.originalUrl);
if (err.status == 404) err.message = "The requested url "+req.originalUrl+" was not found on this server.";
res.status(err.status || 500);
res.render('error', {
Expand Down
1 change: 0 additions & 1 deletion src/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh
cd /app/bin

if [ "$1" ]
then
NODE_ENV="production" PORT=$1 node ./www
Expand Down

0 comments on commit b6e966d

Please sign in to comment.