Skip to content

Does the config example lack line 'content_by_lua' ? #127

Closed
@boynet

Description

@boynet

in the example config you gave this sample code:

nginx {
    if_modified_since Off;
    lua_check_client_abort On;
    resolver 8.8.8.8;

    lua_package_path '/path/to/lua-resty-http/?.lua;/path/to/lua-resty-redis-connector/?.lua;/path/to/lua-resty-qless/?.lua;/path/to/lua-resty-cookie/?.lua;/path/to/ledge/?.lua;;';

    init_by_lua '
        local ledge_m = require "ledge.ledge"
        ledge = ledge_m.new()
        ledge:config_set("upstream_host", "HOST.EXAMPLE.COM")
    ';

    init_worker_by_lua 'ledge:run_workers()';

    server {
        location / {
            'ledge:run()';
        }
    }
}

in the server directive it should be:
content_by_lua 'ledge:run()'; ?

  1. does the loa_package_path should point to the folder with the *.lua files or the "main folder"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions