NAME
yapi.pl - Yote API server entry point
SYNOPSIS
# Start API server
perl yapi.pl --config config/yapi.yaml
perl yapi.pl --port 5001
# Start server + spiderpup file watcher
perl yapi.pl --config config/yapi.yaml --watch
perl yapi.pl --config config/yapi.yaml --watch 2 # check every 2s
# Scaffold a new project
perl yapi.pl init myproject
# Compile YAML app definitions to Perl modules
perl yapi.pl compile yaml/example.yaml lib/
# Compile all spiderpup pages
perl yapi.pl pages
# Watch mode: recompile on changes
perl yapi.pl pages --watch
perl yapi.pl pages --watch 2
DESCRIPTION
Entry point for the Yote API server with project scaffolding and compilation tools. Spiderpup page serving and watching should be run separately via pupserver.
- Default (no subcommand)
-
Runs the YapiServer API server. Config lib_paths are added to @INC automatically. With --watch, also forks a spiderpup file watcher that recompiles pages/recipes on changes. Requires www_dir and webroot_dir in config. Spiderpup sources are expected at www_dir/spiderpup (or override with spiderpup_dir in config).
- init [directory]
-
Scaffolds a new project directory with the standard layout and starter files.
- compile
-
Compiles YAML app definitions to Perl modules via Yote::YapiServer::Compiler.
- pages
-
Compiles all Spiderpup pages (or watches for changes with --watch).