Live development
Now that you've got a grasp on the structure of a pod, we can jump into changing configs, writing content, and working on templates. All of this is easily possible using Grow's built-in development server, which you can start using the run
command:
$ grow run
When you start the development server, Grow checks for updates to the SDK, compiles translations, and runs preprocessors. If any of these tasks fail, the test server will fail to start. Here's what it looks like when you start your development server:
$ grow run
Compiled: /source/sass/main.scss -> /dist/main.min.css
Pod loaded in 0.247 s
Pod: /my-codelab
Address: http://localhost:8080/
Server ready. Press ctrl-c to quit.
Your development server is now running, and by default, your web browser will open to your project's root, ready for you to preview.
Changes to content (in content/
), templates (in views/
), or static files are immediately reflected, and a quick refresh of any page allows you to see your changes immediately.
Grow watches for changes to files that require preprocessing (such as files in source
or translations
). Changes to those files will cause Grow to kick off a preprocessor to build the generated files, and your changes will be reflected in the live preview almost immediately.
Open http://localhost:8080
in your browser and navigate through the site. This entire site is built by your codelab pod.