maze
  • Introduction
  • Getting Started
    • Quick Start
  • Guides
    • Overview
    • Installation
    • Create New App
    • Directory Structure
    • Configuration
    • Docker
    • Controllers
      • Sessions
      • Request & Response Objects
      • Halt!
      • Respond With
      • Params Validation
      • Cookies
      • Filters
      • Flash
      • Redirection
    • Views
      • View Helpers
    • Models
      • Granite
        • Granite's README
        • Migrations
        • Validations
        • Callbacks
        • Associations
        • Querying
        • Bulk Insertions
      • Crecto
        • Crecto's README
      • Jennifer
        • Jennifer Docs
        • Migrations
        • Models
    • Routing
      • Pipelines
      • Routes
    • Websockets
      • Channels
      • Sockets
      • JavaScript Client
    • Mailers
      • Deliver a new Email
  • Testing
    • System Tests
  • Deployment
    • Digital Ocean
    • Heroku
  • CLI
    • New
    • Recipes
    • Generate
    • Database
    • Watch
    • Routes
    • Exec
    • Encrypt
    • Deploy
  • Examples
    • Maze Auth
    • Crystal Debug
    • Minimal Configuration
  • Troubleshooting
  • Contributing
  • Code of Conduct
  • HAVE A QUESTION?
    • Ask on Gitter
    • Ask on StackOverflow
    • Follow on Twitter
    • Submit an issue
Powered by GitBook
On this page
  1. CLI

Watch

The maze watch compiles and runs your project. It also monitors for changes and rebuilds when necessary.

Here is a list of the commands available:

maze watch or maze w

maze watch [OPTIONS]

Options:
  -b, --build             Overrides the default build command
                          (default: crystal build ./src/[process_name].cr)
  --build-args            Specifies arguments for the build command
  -i, --info              Shows the values for build/run commands, build/run args, and watched files
  -n, --name              Sets the name of the app process
                          (default: [process_name])
  --no-build              Skips the build step
  -r, --run               Overrides the default run command
                          (default: ./[process_name])
  --run-args              Specifies arguments for the run command
  -w, --watch (multiple)  Overrides default files and appends to list of watched files
                          (default: ./src/**/*.cr, ./src/**/*.ecr)
  -h, --help              show this help

Example

$ maze watch
02:58:23 Watcher    | (INFO) Watching 22 files (server reload)...
02:58:23 Watcher    | (INFO) Building project App01...
02:58:31 Watcher    | (INFO) Terminating app App01...
02:58:31 Watcher    | (INFO) Starting App01...
02:58:31 NodeJS     | (INFO) Installing dependencies...
02:58:31 NodeJS     | (INFO) Watching public directory
02:58:31 Server     | (INFO) Maze 0.7.2 serving application "App01" at http://0.0.0.0:3000
02:58:31 Server     | (INFO) Server started in development.
02:58:31 Server     | (INFO) Startup Time 00:00:00.000182000
02:58:31 Watcher    | Watching 10 client files...
PreviousDatabaseNextRoutes

Last updated 7 years ago