1

I would like to try running KeystoneJS without MongoDB.

There's a short blog post explaining how to do it at http://ifrederik.com/blog/2014/11/cms-without-db-running-keystonejs-without-mongodb/

Basically, it explains how to replace MondgoDB with TingoDB and using a Tungus driver.

The advice is to put the following into the top of the keystone.js file

global.TUNGUS_DB_OPTIONS = { nativeObjectID: true, searchInArray: true };
var tungus = require('tungus');
var mongoose = require('mongoose');

And later to set mongo database url to TingoDB.

keystone.set('mongo', 'tingodb://'+__dirname+'/data');

By doing this I got KeystoneJS up and running. By inspecting the contect of data/users file in TingoDB I can even see that the default user gets created, but I was not able to log in. It always reports that username / password combination is not ok.

What am I missing? How do I debug the problem to find out what exactly is the problem here?

Marko
  • 30,263
  • 18
  • 74
  • 108

1 Answers1

0

Ok, to asnwer to myself, the problems seems to be because User.modele.findOne({email: emailRegExp}) doesn't work in TingoDB/Tungus. When replaced it with lookup.email, without using regex-es, it semms to work.

But who knows if and what else will break because of incompatibility.

Marko
  • 30,263
  • 18
  • 74
  • 108