Доброй ночи!
Пытаюсь завести nginx+tarantool по туториалу https://dzone.com/articles/restful-services-made-simple-how-to-get-started-in. И что-то оно не хочет работать - пишет {"id":0,"error":{"message":"Procedure 'tnt' is not defined","code":-32601}}
Не пойму что не так. Nginx завёлся и работает (пускаю его в докере, конфиг кладу сюда /etc/nginx/conf.d/default.conf
). Тарантул запускаю с echo.lua
. (сетевой доступ от nginx до тарантула есть).
p.s. ума не приложу зачем нужна функия function echo(a)
в echo.lua
function intTxByTimeRangeAndNativeType(userType, from, to)
if from > to then
from = to
end
local rows = {}
local i = 1
for _, t in box.space.acc_tx.index.timeIndex:pairs({from}, { iterator = box.index.GE }) do
if (t[3] <= to and t[11] == userType) then
rows[i] = t
i = i + 1
end
end
return rows
end