Core Development Concepts > Basics
Watch Command
Learn how to continuously rebuild and redeploy your code using the "webiny watch" command.
The webiny watch
command is available since Webiny v5.5.0.
- how to use the
webiny watch
command to develop on top of Webiny - how the
webiny watch
command works for frontend and backend development
Overview
The watch command is the number one command you’ll be using while developing on top of Webiny.
It supports both frontend and backend development, and it works with the three project applications every Webiny project consists of:
- API (
apps/api
) - Admin (
apps/admin
) - Website (
apps/website
)
To use it, you run the webiny watch
command followed by the project application you want to watch:
Extensions are the primary way to develop on top Webiny and extend it. To learn more, check out the Extensions article.
How It Works
Frontend Development
When it comes to frontend development (Admin and Website project applications), the watch command offers an experience similar to other existing frontend development solutions out there. Once started, the watch command:
- spins up a local development server that serves your application
- the application is automatically rebuilt and refreshed in the browser whenever a code change is detected
Note that you must have the API project application already deployed before watching Admin and Website project applications. This is because of the fact that these applications depend on Webiny’s backend APIs to work as expected.
Backend Development
When it comes to backend development (API project application), the watch command doesn’t spin up a local development server, but it watches for changes and continuously deploys them the cloud (AWS Lambda). This approach sort of emulates the local development server experience, because changes are automatically reflected in the cloud (as soon as they are deployed).
With the 5.41.0 release and with the introduction of the New Watch Command (Local AWS Lambda Development), we’ve made significant improvements to the way backend development is done. The feature is still in beta, but we encourage you to try it out and provide feedback.
FAQ
Can I Run Webiny Fully Locally, Without Deploying It to AWS?
Because Webiny is built on top of AWS and its proprietary services, it’s not possible to run Webiny fully locally. At the very least, you need to deploy the API project application to AWS, because it’s the backbone of the entire system. The Admin and Website project applications can be run locally, but they depend on the API project application to work as expected.