ckobasti
ckobasti8mo ago

Creating API with Convex?

I have an assesment to make an API, with many endpoints, out of several different APIs. I chose NodeJS for building this, but i didnt choose the Database yet. Because i used Convex on my previous ( yet less demanding ) projects and i liked it so much, im wondering if it could work with Convex, so i don't have to use MongoDB or MySQL? My finished product, an actual API with tons of endpoints has to have all the information about all 70k different cryptocurrencies, previously pulled from several different existing APIs. Its gonna update every 1-2 minutes.
7 Replies
Michal Srb
Michal Srb8mo ago
For sure you can use Convex. You probably don't need a Node.js server at all, you can code up the endpoints directly in Convex with https://docs.convex.dev/functions/http-actions
HTTP Actions | Convex Developer Hub
HTTP actions allow you to build an HTTP API right in Convex!
ckobasti
ckobastiOP8mo ago
Will it handle it properly? I mean because its really tons of information updating very frequently
Michal Srb
Michal Srb8mo ago
For sure. People have tables with millions of rows and tables that update hundreds times of per second in Convex for example.
ckobasti
ckobastiOP8mo ago
Great! How can i configure and set up a convex project alone? Without nextjs or any front end framework?
Michal Srb
Michal Srb8mo ago
npm create convex@latest and follow the prompts
ckobasti
ckobastiOP8mo ago
Great did that already thanks! How to make field with unique values so it wont create new row until its new value on every unique field
Michal Srb
Michal Srb8mo ago
You can check for an existing document with the value (and if there is one, throw/ignore the mutation)

Did you find this page helpful?