Skip to content

Commit

Permalink
Ensure default dev user in local development script
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulade committed Jun 30, 2021
1 parent 05fcb63 commit 3f1df35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app.js
Expand Up @@ -8,7 +8,7 @@ var PORT = process.env.PORT || 3000;
var BIND_ADDRESS = process.env.BIND_ADDRESS || '0.0.0.0';

if (!process.env.CLOUDRON_APP_ORIGIN) {
console.log('No APP_ORIGIN env var set. Falling back to http://localhost');
console.log('No CLOUDRON_APP_ORIGIN env var set. Falling back to http://localhost');
}

var express = require('express'),
Expand Down
9 changes: 8 additions & 1 deletion localdevelopment
Expand Up @@ -20,7 +20,14 @@ done

export MONGODB_IP=`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${CONTAINER_NAME}`

echo ""
echo "Adding developer test user:"
echo "username: test"
echo "password: test"
echo ""
./admin user-add --username test --password test --display-name "Test User" || true

export CLOUDRON_MONGODB_URL="mongodb://${MONGODB_IP}:27017/meemo"
echo "export CLOUDRON_MONGODB_URL=\"mongodb://${MONGODB_IP}:27017/meemo\""
export CLOUDRON_APP_ORIGIN="http://localhost:3000"

node --trace-warnings app.js

0 comments on commit 3f1df35

Please sign in to comment.