Hi
I have an error when trying to run a simple server in docker with tarantool/tarantool
How to reproduce:
put code from https://www.tarantool.io/en/doc/latest/book/app_server/cookbook/#http-server-lua to test.lua
#!/usr/bin/env tarantool
local function handler(self)
return self:render{ json = { ['Your-IP-Is'] = self:peer().host } }
end
local server = require('http.server').new(nil, 8080) -- listen *:8080
local router = require('http.router').new({charset = "utf8"})
server:set_router(router)
router:route({ path = '/' }, handler)
server:start()
+ run `docker run --rm -t -i -v "$(pwd)"/test.lua:/opt/tarantool/test.lua tarantool/tarantool:2.8 tarantool /opt/tarantool/test.lua`
```bash
LuajitError: /opt/tarantool/test.lua:8: module 'http.router' not found:
no field package.preload['http.router']
no file '/opt/tarantool/http/router.lua'
no file '/opt/tarantool/http/router/init.lua'
no file '/opt/tarantool/http/router.so'
no file '/opt/tarantool/.rocks/share/tarantool/http/router.lua'
no file '/opt/tarantool/.rocks/share/tarantool/http/router/init.lua'
no file '/opt/.rocks/share/tarantool/http/router.lua'
no file '/opt/.rocks/share/tarantool/http/router/init.lua'
no file '/.rocks/share/taranto
fatal error, exiting the event loop
Hi I have an error when trying to run a simple server in docker with
tarantool/tarantool
How to reproduce:https://www.tarantool.io/en/doc/latest/book/app_server/cookbook/#http-server-lua
totest.lua
local function handler(self) return self:render{ json = { ['Your-IP-Is'] = self:peer().host } } end
local server = require('http.server').new(nil, 8080) -- listen *:8080 local router = require('http.router').new({charset = "utf8"}) server:set_router(router) router:route({ path = '/' }, handler) server:start()
idk where to place the issue, this is duplicate https://github.com/tarantool/http/issues/139