Im a new. Give me an advise about to making the program that detect the earthquake.
Well, you will certainly need to give us more to go on than that.
You will need at least a platform to run Node-RED and a sensor to detect the earthquake. When you've decided how you want to put that together and what you've tried, feel free to come back and ask for more specific help then.
i use the raspberry pi to run node-red. Can i use earthquake database in the internet to get the earthquake notification soon?
Sorry my english is not enough good.
Yes you can run node-red on a pi it comes preinstalled
How to monitor earthquakes with node-red see https://www.google.co.uk/search?q=node-red+earthquakes&ie=UTF-8&oe=UTF-8&hl=en
The example at the bottom of the worldmap page does this already...