DEV Community

Nenba Jonathan
Nenba Jonathan

Posted on

Which ORM to use for build an API with NodeJS ?

Hello @everyone

I want to create an API with nodejs and express to delivery some information.

I have check some solution but i'm always lost.

I will use a relational database and the API will be consumed by a React application.

whatever you say to me will be useful.

Thank you

Top comments (7)

Collapse
 
rhymes profile image
rhymes •

Which relational DB? If it is Postgresql you might want to consider a data mapper like @dmfay 's Massive.js

Collapse
 
nejos97 profile image
Nenba Jonathan •

I do not have my choice yet. but it will be postgre or mysql. but if you know of another less heavy database it's good

Collapse
 
rhymes profile image
rhymes •

Maybe if you can tell me more about what kind of app it is and what kind of data you have to deal with I can think of an alternative. But if the data is relational I would choose PostgreSQL

Thread Thread
 
nejos97 profile image
Nenba Jonathan •

It's a simple platform who user can register and login, they can complete their profile and follow other.

Thread Thread
 
rhymes profile image
rhymes •

Hi Nenba!

It seems like you're describing the basics of a social network :)

I don't know which constraints you have but I think you can map everything on top of a relational DB, if you outgrow it there are better solutions for the "follow other" part

Collapse
 
kelgendy1204 profile image
Khaled Saad •

Check objection.js, it simple and easy.

Collapse
 
georgenorris profile image
George C. Norris •

most ORMs for Node have a disorganized and cluttered API.