Skip to content

[NFR]: Runtime commands #10

Description

@niden

Goal: run and maintain an application from crest.

  • serve (alias server) : start PHP's built-in server for the project
  • cache:clear : needs a design
  • optimize : direction only, needs a design

serve

devtools had serve / server. Crest replaces devtools, so it needs the same.

  • --port, default 8080, cast to int.
  • Projects from crest new ([NFR]: Project commands #8) get a container that runs php -S 0.0.0.0:8080 -t public .htrouter.php. serve uses the same command, so crest serve on the host and crest up in docker do the same thing.
  • The closing output of crest new prints crest serve for the host path.
  • Open: what serve does in a project that has no .htrouter.php.

cache:clear, optimize

Both need the project container (Project\Bootstrap). Design them when the runtime concerns they touch are clear.

Rules

  • Crest does not cache project data. If a command is slow, it reads less. It does not remember more.
  • up and down are not maintenance-mode commands. Those names belong to the docker compose wrappers in [NFR]: Project commands #8.

Done when

  • serve ships with the same --help, alias and error conventions as the other commands.
  • cache:clear and optimize are designed and shipped, or moved to their own issues.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

  • Status
    Implemented

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions