i installed lapis using 'sudo luarocks install lapis' but when i use 'lapis server' it appears that it couldnt find module "lapis". Need help, i am using fedora 40
------------- app.lua
local lapis = require("lapis")
local config = require("lapis.config").get()
local app = lapis.Application()
app:get("/", function()
return "Hello"
end)
return app
------------- config.lua
local config = require("lapis.config")
config("development", {
server = "nginx",
code_cache = "on",
num_workers = 1,
port = 8000,
host = "localhost",
user = "administrador",
password = "1234",
database = "Restaurante"
})
lua entry thread aborted: runtime error: content_by_lua(nginx.conf.compiled:20):2: module 'lapis' not found:
no field package.preload['lapis']
no file '/usr/local/openresty/site/lualib/lapis.ljbc'
no file '/usr/local/openresty/site/lualib/lapis/init.ljbc'
no file '/usr/local/openresty/lualib/lapis.ljbc'
no file '/usr/local/openresty/lualib/lapis/init.ljbc'
no file '/usr/local/openresty/site/lualib/lapis.lua'
no file '/usr/local/openresty/site/lualib/lapis/init.lua'
no file '/usr/local/openresty/lualib/lapis.lua'
no file '/usr/local/openresty/lualib/lapis/init.lua'
no file './lapis.lua'
no file '/usr/local/openresty/luajit/share/luajit-2.1/lapis.lua'
no file '/usr/local/share/lua/5.1/lapis.lua'
no file '/usr/local/share/lua/5.1/lapis/init.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/lapis.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/lapis/init.lua'
no file '/usr/local/openresty/site/lualib/lapis.so'
no file '/usr/local/openresty/lualib/lapis.so'
no file './lapis.so'
no file '/usr/local/lib/lua/5.1/lapis.so'
no file '/usr/local/openresty/luajit/lib/lua/5.1/lapis.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
coroutine 0:
[C]: in function 'require'
content_by_lua(nginx.conf.compiled:20):2: in main chunk, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "localhost:8000"
2024/10/29 13:47:15 [error] 4479#0: *2 open() "/home/flavio/git/Banco2-Projeto_1/static/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: , request: "GET /favicon.ico HTTP/1.1", host: "localhost:8000", referrer: "http://localhost:8000/"
i installed lapis using 'sudo luarocks install lapis' but when i use 'lapis server' it appears that it couldnt find module "lapis". Need help, i am using fedora 40
nginx.conf
ERROR: