简体   繁体   中英

(Why) Does Apigility only work in the development mode?

In the Apigility docu is described, how to "install" Apigility . There are several methods to do this, but the last step should alway be:

cd path/to/install
php public/index.php development enable # put the skeleton in development mode

Without it the skeleton calls in browser and with an arror message:

An error occurred

An error occurred during execution; please try again later.

  • Does Apigility only work without the development mode? If Yes -- why?
  • What other modes are there? Where are they listed and described?

As far as I know there are two basic modes live and dev.

It basically controls whether application.config.php gets loaded or dev.application.config.php (the dev config will get merged with the normal one when development mode is enabled)

They should both work just fine. When you are in the dev mode you can enable modules in the config like

// Development time modules
'modules' => array(
    'ZFTool',
    'ZF\Apigility\Admin',
    'ZF\Apigility\Welcome',
    'ZendDeveloperTools',
),

So that on production server you cannot access the apigility interface as the module isn't loaded at all which is nice and secure as nobody wants users messing with there api haha.

But you should be able to make api calls in both modes. I guess you have an issue in your config somewhere if you are getting issues with api calls in dev mode, though it is unclear if you mean this or not being able to access the admin interface

Theres some pretty good documentation about development mode:

https://apigility.org/documentation/modules/zf-development-mode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM