tensei: Unable to login with mongodb config

Bug report

Hello @bahdcoder I just made complete backend in Tensei, I was amazing… But now i have changed the db to MongoDb. How ever, I am unable to login now. What could be the reason and what I can do in this matter?

This is my package.json

{
  "name": "tensei-awesome-app",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "@mikro-orm/mongodb": "^4.5.6",
    "@tensei/auth": "^0.8.4",
    "@tensei/cms": "^0.8.4",
    "@tensei/core": "^0.8.4",
    "@tensei/graphql": "^0.8.4",
    "@tensei/media": "^0.8.4"
  },
  "scripts": {
    "dev": "nodemon src/index",
    "start": "node index.js"
  },
  "devDependencies": {
    "@mikro-orm/sqlite": "^4.4.0",
    "nodemon": "^2.0.7"
  }
}

Index.js

const { cms } = require("@tensei/cms");
const { auth } = require("@tensei/auth");
const { media, files, file } = require("@tensei/media");
const { graphql } = require("@tensei/graphql");
const {
  tensei,
  welcome,
  resource,
  text,
  integer,
  hasOne,
  textarea,
  belongsTo,
  belongsToMany,
  hasMany,
  date,
} = require("@tensei/core");

tensei()
  .root(__dirname)
  .plugins([
    welcome(),
    cms().plugin(),
    media().plugin(),
    auth()
      .rolesAndPermissions()
      .plugin(),
    graphql().plugin(),
  ])
  .databaseConfig({
    type: "mongo",
    dbName: "khelo_ka_raja",
    clientUrl:
      "mongodb+srv://mystring",
  })
  .start()

  .catch(console.error);

Everything works just perfectly removing the db config. This also dosent show any error. Can you please help me in this? It would be great as I am in a hurry.

Regards, @Manjit2003

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@bahdcoder Thanks for ultra fast reply ⚡… Will be eagerly waiting