Yeah. There are "Lua rocks" (https://luarocks.org/) for Lua, but they have a few hundreds of packages only. Compared to npm there's no comparison at all.
On the other hand you wouldn't want to use RDBMS with OpenResty anyway, I think. The whole point of using Nginx scripting (especially with LuaJIT, which is awesome) is to be as fast as possible. True, DB connections are async in Resty, but they are still going to take some time. For simple data that don't need to be persistent it's better to use ngx.shared - an in process dictionary shared between all scripts. For more complicated or persistent data, you have Redis and other fast solutions.
Additionally, Nginx offers a full non-blocking socket API to Lua scripts. You can write a "driver" for anything that wants to speak to you over a network.
Yeah. There are "Lua rocks" (https://luarocks.org/) for Lua, but they have a few hundreds of packages only. Compared to npm there's no comparison at all.
On the other hand you wouldn't want to use RDBMS with OpenResty anyway, I think. The whole point of using Nginx scripting (especially with LuaJIT, which is awesome) is to be as fast as possible. True, DB connections are async in Resty, but they are still going to take some time. For simple data that don't need to be persistent it's better to use ngx.shared - an in process dictionary shared between all scripts. For more complicated or persistent data, you have Redis and other fast solutions.
Additionally, Nginx offers a full non-blocking socket API to Lua scripts. You can write a "driver" for anything that wants to speak to you over a network.