Taiwan has earned a global reputation for its electronic products, good food and motorcycles. But less is known abroad about the island nation's booming coffee scene.

In Taiwanese cities, there are coffee shops everywhere that people can step into at any time of day to escape the chaotic streets outside.

The enterprises range from gourmet coffee shops where customers are required to swap shoes for slippers and can only drink black coffee, to convenience stores that serve coffee in paper cups 24 hours a day.

One of the most popular locales in Taiwan is the Astoria cafe, which was opened in Shanghai in 1920 and moved to Taipei in 1949 after the Nationalist government lost the Chinese civil war.

Astoria's current owner, Taiwanese national Chien Chin-chui, visits the popular haunt almost every day to drink coffee and chat with customers.

In most cafes, a cup of coffee sells for $3 to $5, while in convenience stores, a cup of coffee sells for around $2 with a discount on the second cup, which can be picked up on another day.

Describing Taiwan's coffee culture, one local interior decorator said that in Taipei there are five coffee shops opening and five coffee shops closing every day.

Taiwan's coffee culture dates back to the colonial days when Japan occupied Taiwan from 1895 to 1945, according to Su Teng-chao, an official from the Council of Agriculture.

"Japanese colonialists liked to drink coffee, so they opened coffee farms in Taiwan," he told epa.

Over the years, coffee has become a part of life in Taiwan, and has replaced tea as the people's most popular drink.

While Taiwan's climate is suitable for growing coffee, the output is too small, so the island nation imports the majority of its coffee from other countries in Asia, Africa and Latin America.

Su said that in 2015, Taiwan grew 900 tons of coffee and imported 30,000 tons.

"As we do not have large-scale production, we encourage farmers to grow specialty coffee and improve coffee growing and coffee bean baking methods through holding competitions and joining international contests," he said.

Through such competitions and successful farming enterprises, Taiwan's central Nantou County has developed a reputation for producing delicious coffee.

There, local farmer Su Chun-hsien recently showed off his coffee farm set in Nantou's picturesque mountains.

From the Baisheng Coffee Farm and Resort, Su grows four tons of Arabica coffee beans each year, serving it to tourists who stay at the resort and selling it by the packet.

Nantou coffee became the focus of international attention when, in 2012, US coffee expert Erna Knutzen sampled some coffee made from beans grown by local farmer Yu Fang-hsia.

Surprised that Taiwan could produce such good coffee, she flew to Taiwan to visit Yu.

Knutzen said she couldn't stop drinking Yu's coffee because of its heavenly aroma that combines the taste of dark chocolate and coffee.

And with such acclaim, Taiwan's coffee artisans hope that its reputation in the sector will only get bigger.