search

Home  >  Q&A  >  body text

nginx - How to introduce all the files in the lua directory (`kafka/*`) into the environment?

Ask a question:
How to introduce all the files in the lua directory (kafka/*) into the environment? I only know the following method

package.path = package.path..';lua/?.lua'

伊谢尔伦伊谢尔伦2747 days ago799

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 17:10:17

    Found a solution on github.

    init.lua

    package.path = package.path.. ';lua/?.lua'
                   .. ';lua/resty/kafka/?.lua';

    reply
    0
  • Cancelreply