Can I Use This?

The webiny watch command is available since Webiny v5.5.0.

What you'll learn
  • 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
anchor

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:

  1. API (apps/apiexternal link)
  2. Admin (apps/adminexternal link)
  3. Website (apps/websiteexternal link)

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
anchor

Frontend Development
anchor

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:

  1. spins up a local development server that serves your application
  2. 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
anchor

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).

New Watch Command Available

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
anchor

Can I Run Webiny Fully Locally, Without Deploying It to AWS?
anchor

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.