Including Pimcore 6 in lumen

hey guys, just want to ask how to include pimcore’s object classes and other feature into lumen’s framework?

i’ve been trying to add external.php in pimcore bin folder and calling it in lumen’s index.php but it doesn’t work

bin/external.php’s code:

if (file_exists($a = getcwd() . ‘/vendor/autoload.php’)) {
include $a;
} elseif (file_exists($a = DIR . ‘/…/…/…/…/vendor/autoload.php’)) {
include $a;
} elseif (file_exists($a = DIR . ‘/…/vendor/autoload.php’)) {
include $a;
} else {
fwrite(STDERR, ‘Cannot locate autoloader; please run “composer install”’ . PHP_EOL);


define(‘PIMCORE_CONSOLE’, true);

/** @var \Pimcore\Kernel $kernel */
$kernel = \Pimcore\Bootstrap::startupCli();

thank you