Functional near-infrared spectroscopy (fNIRS) is an emerging wearable neuroimaging technique based on monitoring the hemodynamics of brain activity. First, the operation principle of fNIRS is described. This includes introducing the absorption spectra of the targeted molecule: the oxygenated and deoxygenated hemoglobin. Then, the optical path formed by emitters and detectors and the concentration of the molecules is determined using Beer-Lambert law. In the second part, the advantages of applying fNIRS are compared with other neuroimaging techniques, such as computed tomography and magnetic resonance imaging. The compared parameters include time and spatial resolution, immobility, etc. Next, the evolution of the fNIRS devices is shown. It includes the commercially available systems and the others under construction in academia. In the last section, the applications of fNIRS to avoid stroke are presented. The challenges of achieving good signal quality and high user comfort monitoring on stroke patients are discussed. Due to the wearable, user-friendly, and accessibility characteristics of fNIRS, it has the potential to be a complementary technique for real-time bedside monitoring of stroke patients. A stroke risk prediction system can be implemented to avoid stroke by combining the recorded fNIRS signals, routinely monitored physiological parameters, electronic health records, and machine learning models.