This post will help you get started with js-yaml as a means of parsing a YAML file into an object that you can then use to soft code you node.js application.
First start with a basic YAML file example such as this.
As you can see you can use the number sign to indicate a comment. I am also defining a object called options by just defining some more properties rather than giving a value.
So start a new node.js test project cd into the folder of it as usual and the add js-yaml to the project.
Once you have js-yaml in your node_modules folder working with it is pretty straight forward.
In this post I will not be going over the full scope of YAML, there are some good resources that do just that. This is just another quick post of mine on one of the many node.js packages I have fiddled around with.
Be sure to check out my many other posts on node.js and npm packages.