diff --git a/create-configmap b/create-configmap index f4216cb..4bfb6c8 100755 --- a/create-configmap +++ b/create-configmap @@ -1,4 +1,4 @@ -export CREDS=`echo $DOCKERHUB_USER:$DOCKERHUB_PASSWORD | base64` +export CREDS=`echo -n "$DOCKERHUB_USER:$DOCKERHUB_PASSWORD" | base64` echo credentials = $CREDS cat < { const db = client.db(dbName) req.list = await db.collection('inserts').find({}).toArray(); + if(!req.list) { + req.list = [ "empty" ] + } } catch (err) { console.log(err.stack) } diff --git a/routes/users.js b/routes/users.js index 623e430..ba685af 100644 --- a/routes/users.js +++ b/routes/users.js @@ -2,7 +2,7 @@ var express = require('express'); var router = express.Router(); /* GET users listing. */ -router.get('/', function(req, res, next) { +router.get('/users', function(req, res, next) { res.send('respond with a resource'); });