log indexes and comment for docker export

This commit is contained in:
Ruben van de Ven 2021-01-29 11:37:47 +01:00
parent 743f08189c
commit f820a8a85f
3 changed files with 10 additions and 0 deletions

View file

@ -30,6 +30,11 @@ To run it we provide the port to publish, and need to map the volumes of mongo f
`docker run -it --env-file .env.production --publish 8001:8000 -v /tmp/dp/db:/data/db -v /tmp/dp/configdb:/data/configdb --name dp_app digitalplayground` `docker run -it --env-file .env.production --publish 8001:8000 -v /tmp/dp/db:/data/db -v /tmp/dp/configdb:/data/configdb --name dp_app digitalplayground`
Export the image using:
`docker save digitalplayground > dp_docker.tar`
## s3 storage ## s3 storage
Gebruik s3cmd om bucket in te stellen. Gebruik s3cmd om bucket in te stellen.

View file

@ -224,4 +224,5 @@ userSchema.statics.EmailConfirmation = EmailConfirmationStates;
userSchema.index({ username: 1 }, { collation: { locale: 'en', strength: 2 } }); userSchema.index({ username: 1 }, { collation: { locale: 'en', strength: 2 } });
userSchema.index({ email: 1 }, { collation: { locale: 'en', strength: 2 } }); userSchema.index({ email: 1 }, { collation: { locale: 'en', strength: 2 } });
export default mongoose.model('User', userSchema); export default mongoose.model('User', userSchema);

View file

@ -191,6 +191,10 @@ app.use('/api', (error, req, res, next) => {
// overview of users: // overview of users:
app.get('/users', (req, res) => { app.get('/users', (req, res) => {
User.collection.getIndexes().then((indexes) =>{
console.log('indexes', indexes);
})
// let results = []; // let results = [];
User.find({}).sort({ createdAt: -1 }).exec() User.find({}).sort({ createdAt: -1 }).exec()
.then((users) => { .then((users) => {