To program for the ESP8266, you need to install some packages for the Arduino program/computer.
To add the ESP boards to the board list in Arduino, you * Add the line http://arduino.esp8266.com/stable/package_esp8266com_index.json into the preferences pane, in the “Additional Boards Manager URLs” * Then open Tools -> Board -> Boards Manager and install ESP8266
You can now select your proper board from the list.
Next, you need to make sure you can select the proper port it’s connected to. To do that, you install the driver from here
Then, you choose the port named “/dev/cu.SLAB_USBtoUART”
Now you’re ready to build and upload as usual for your NodeMCU board!