# Forest-express-mongoose doesn't work

**URL:** <https://community.forestadmin.com/t/forest-express-mongoose-doesnt-work/5934>\
**Category:** Help me!\
**Created:** [February 1, 2023, 5:21am UTC](https://community.forestadmin.com/t/forest-express-mongoose-doesnt-work/5934 "2023-02-01T05:21:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![qqaazzxxsswweeffvv](https://avatars.discourse-cdn.com/v4/letter/q/d9b06d/32.png) [@qqaazzxxsswweeffvv](https://community.forestadmin.com/u/qqaazzxxsswweeffvv)\
**Post date:** [February 1, 2023, 5:21am UTC](https://community.forestadmin.com/t/forest-express-mongoose-doesnt-work/5934/1 "2023-02-01T05:21:02Z")

</div>

Hi! I can’t run and work with data on my express app. Same problem I had with NestJS and forestadmin/agent.  
I have latest version of forest-express-moongoose.

```javascript
require("dotenv").config();

const express = require("express");
const app = express();

const forest = require("forest-express-mongoose");
const mongoose = require("mongoose");

(async () => {
  await mongoose.connect('mongodb://127.0.0.1:27017/test')

  app.use((req, res, next) => {
    console.log(`Req: ${req.method} - ${req.url}`);
    next();
  });

  app.use(
    await forest.init({
      authSecret: process.env.FOREST_AUTH_SECRET,
      envSecret: process.env.FOREST_ENV_SECRET,
      objectMapping: mongoose,
      connections: {
        default: mongoose.connection,
      },
    })
  );

  app.use(express.json());

  app.get("/", (req, res) => res.send("OK"));
  app.listen(8000, () => console.log("started"));
})();

```

What I get in admin panel:

 ![Screenshot 2023-01-31 at 21.15.25](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/a/aae74fa756e7598456a6005e739c2ab3e48d13c7.png)

Documentation is helpless for me. Does anybody has a working example repo with latest forest lib?

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [February 1, 2023, 2:03pm UTC](https://community.forestadmin.com/t/forest-express-mongoose-doesnt-work/5934/3 "2023-02-01T14:03:49Z")

</div>

Hey @qqaazzxxsswweeffvv, and welcome to our community 👋

Could you share:

- Any relevant log (Either on the agent & the frontend, in the developer console)
- Your project name, so I can check your configuration on our end?

Thanks in advance 🙏

---

<div class="post-metadata">

**Author:** ![qqaazzxxsswweeffvv](https://avatars.discourse-cdn.com/v4/letter/q/d9b06d/32.png) [@qqaazzxxsswweeffvv](https://community.forestadmin.com/u/qqaazzxxsswweeffvv)\
**Post date:** [February 1, 2023, 4:21pm UTC](https://community.forestadmin.com/t/forest-express-mongoose-doesnt-work/5934/4 "2023-02-01T16:21:15Z")

</div>

Sure! Thank you so much! Here is the information you need ☺  
Logs on login in forest admin:

```javascript
[forest] 🌳🌳🌳 Your connections do not seem to have any models. Please check if your connections import your models.
[forest] 🌳🌳🌳 Checking need for apimap update...
started
[forest] 🌳🌳🌳 No change in apimap, nothing sent to Forest.
Req: OPTIONS - /forest/authentication
Req: POST - /forest/authentication

```

project name: [  
test\_Fqsfqosjf  
 ](https://app.forestadmin.com/test_Fqsfqosjf)

---

<div class="post-metadata">

**Author:** ![qqaazzxxsswweeffvv](https://avatars.discourse-cdn.com/v4/letter/q/d9b06d/32.png) [@qqaazzxxsswweeffvv](https://community.forestadmin.com/u/qqaazzxxsswweeffvv)\
**Post date:** [February 1, 2023, 10:06pm UTC](https://community.forestadmin.com/t/forest-express-mongoose-doesnt-work/5934/5 "2023-02-01T22:06:42Z")

</div>

The funny thing, I found auth problem in another topic. And solution is APPLICATION\_URL env. This is interesting 🤪. The next step to figure out, where is my models…

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [February 2, 2023, 7:21am UTC](https://community.forestadmin.com/t/forest-express-mongoose-doesnt-work/5934/6 "2023-02-02T07:21:02Z")

</div>

Glad you found a solution to your issue.

Don’t hesitate to open a new thread if you encounter another one 👍

---

<div class="post-metadata">

**Author:** ![qqaazzxxsswweeffvv](https://avatars.discourse-cdn.com/v4/letter/q/d9b06d/32.png) [@qqaazzxxsswweeffvv](https://community.forestadmin.com/u/qqaazzxxsswweeffvv)\
**Post date:** [February 2, 2023, 6:20pm UTC](https://community.forestadmin.com/t/forest-express-mongoose-doesnt-work/5934/7 "2023-02-02T18:20:12Z")

</div>

Thank you so much! ☺
