# Cannot POST /api/videos

**URL:** <https://forum.codewithmosh.com/t/cannot-post-api-videos/4367>\
**Category:** Node\
**Created:** [April 22, 2021, 11:36pm UTC](https://forum.codewithmosh.com/t/cannot-post-api-videos/4367 "2021-04-22T23:36:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![faluiggi](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@faluiggi](https://forum.codewithmosh.com/u/faluiggi)\
**Post date:** [April 22, 2021, 11:36pm UTC](https://forum.codewithmosh.com/t/cannot-post-api-videos/4367/1 "2021-04-22T23:36:17Z")

</div>

I’m stuck in Mongo - Data Validation chapter, lesson 7: Add Persistence to Genres API

I made all the refactoring to persist the genres in Mongo DB, however, the vidly database is not created even though:  
a) mongod is running in the background  
b) the connection to the db is successful (I wrapped up the code in a try/catch and no errors are reported):  
try {  
mongoose.connect(url, dbConfig)  
.then(() =\> console.log(‘Connected to MongoDB Vidly…’))  
}  
catch (err) {  
console.log(‘Error’, err.message);  
}  
c) I tried so many times to reproduce what you show as a successful Post through Postman, but it fails, every single time with the following error shown:  
Status: 404 Not Found

 Error 
```
Cannot POST /api/videos
```

---

<div class="post-metadata">

**Author:** ![faluiggi](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@faluiggi](https://forum.codewithmosh.com/u/faluiggi)\
**Post date:** [April 24, 2021, 5:50pm UTC](https://forum.codewithmosh.com/t/cannot-post-api-videos/4367/2 "2021-04-24T17:50:14Z")

</div>

Never mind, I found what was wrong myself.
