dox 3.0.0-alpha.5
dox: ^3.0.0-alpha.5 copied to clipboard
This is a cli tool to generate migration, model and to handle database migration with dox framework. It support up and down methods to control migration version.
dox #
The dox command line tool. It creates projects and files, runs the dev server, builds for production and runs migrations.
Part of Dox, a web backend framework for Dart, like Laravel. Source code: github.com/dartondox/dox.
Install #
dart pub global activate dox 3.0.0-alpha.4
If your shell can not find dox, add $HOME/.pub-cache/bin to your PATH.
Dox 3.x is in alpha (3.0.0-alpha.4). dox update installs the latest stable version, not a preview.
To stay on a preview, run the install command with the version again.
Use it #
dox create my_app # a new project from the starter template
cd my_app
dart pub get
cp .env.example .env
dox s # dev server, restarts when a file changes
Commands #
| Command | What it does |
|---|---|
dox create <name> |
create a new project |
dox serve (or dox s) |
start the dev server with build_runner watch |
dox build |
build the native (AOT) bundle into build/bundle |
dox create:controller <name> [-r] [-ws] |
create a controller |
dox create:model <name> [-m] |
create a model, and with -m its migration |
dox create:dto <name> |
create a DTO (typed, checked input) |
dox make:migration <name> [--sql] |
create a Dart or SQL migration |
dox migration:run (or dox migrate) |
run new migrations |
dox migration:rollback [--step=N] |
undo the last batch, or the last N migrations |
dox key:generate |
make a new APP_KEY |
dox env:generate / dox env:check |
make or check the typed env class |
dox openapi:generate [dir] |
write openapi.json and openapi.yaml |
Run dox help for all commands.
Documentation #
License #
MIT. See LICENSE.