We have just released a new version of the Node scaffolding that supports scripts defined in package.json!
It is common for Node applications to include scripts in their package.json files like so:
The Habitat Node Scaffolding now supports these scripts out of the box.
Let's take it for a test run:
One of my favorite sample React apps is the Pokedex by Ali Gasymov.
Let's Habitize this application and deploy it in a Docker container!
First, clone the Github repo:
Now install the dependencies:
Check out the package.json - notice the scripts section? We will be able to run these to start, build, etc. the application through the Node Scaffolding.
Let's Habitize this app:
Currently, this only builds your application as a HART package - scripts within the package.json file will run when installing this package to wherever you want to run it.
Once the build completes, export your new HART package as a Docker image:
Now, start up a new container with your container image
Then navigate to http://localhost:8000 in your browser and you should see a running pokedex!