Check out example codes for "how to stop rails server". It will help you in understanding the concepts better.

Code Example 1

#from the terminal, type:
(CTRL) + C

Learn ReactJs, React Native from akashmittal.com