Step 5: Build the application

Packaging System Demo

Now it's time to build the application as a Chef Habitat artifact (.hart).

Building your application as a .hart package enables you to do things such as

  • export your application into a variety of cloud-native formats,
  • get automated rebuilds when dependencies are updated,
  • and manage running services via the Chef Habitat Supervisor, to name a few.

First, let's step into a Chef Habitat Studio from the root of the sample-node-app repo, so that we have a clean room from which to build our artifacts.

$ hab studio enter

Next, build the application to produce a Chef Habitat artifact (.hart).

[1][default:/src:0]# build

Once the build finishes, you will see the following message near the end of the output (see screenshot below): "I love it when a comes together."

CLI screenshot after running build