To do it with a graphical user-interface get the NodeMCU Flasher at https://github.com/nodemcu/nodemcu-flasher, there's a Win32/Release and a Win64/Release. I'm assuming you're using the 4MB version, it is as cheap as the 1MB version.
The ESP8266 firmware is available at http://www.espruino.com/binaries/ with the current version at http://www.espruino.com/binaries/espruino_1v92_esp8266_4mb/. Download the files
boot_v1.6.bin, espruino_esp8266_user1.bin, esp_init_data_default.bin and blank.bin (espruino_esp8266_user2.bin is not needed).
Start NodeMCU Flasher, switch to the Config tab and load the files setting these addresses:
Adjust the settings at the "Advanced" tab like this:
Flash size: 4MByte
Flash speed: 40MHz
SPI mode: DIO
If you didn't connect the ESP8266 to the computers USB port it is time to do this now. Then switch to the "Operation" tab, select the COM port and click "Flash (F)" to flash the module.
You can see the flash progress. If you look at the "Log" tab there should be plenty of lines saying "Note:Program flash success.", a few "Note:Set base address success." and the last line will say "Note:Serial port disconnected.".
If it doesn't work just try to flash it again, some boards don't flash properly - especially if your PC can't deliver enough power at the USB port. If you can't flash it successfully after a few times then try using an other USB port, another PC or an external power source for flashing.
Here's a short program to make the build-in LED on the ESP-12 blink fast. You an just paste it to the left side of the editor.
var on = true;
var LED = NodeMCU.D4; //pin 4 of NodeMCU (pin2 of ESP8266)
var onOffTime = 50; //milliseconds
on = !on;