The New Railroads
The hope of small towns when the West was being settled was to have the railroad come through the town. Towns thrive on trade. Farmers are very dependent on getting crops to market via rail, road, and boats. Later on, the Farm to Market Road system was vital to connecting people into towns. Today, high speed Internet serves the same role of connecting towns to the rest of the world. Having a connection to the broader economy is key to a town's survival. Small towns without this connection are fading away fast. The Internet is today's "new railroads."
When the West was settled, towns would be built in places where people hoped a railroad would come through. Some towns actually picked up and moved all the buildings when the railroad went a few miles away.
Harbors also provided very important connections for thousands of years. The biblical town of Ephesus thrived till earthquakes and a silted in harbor sealed its fate. The same silting happened to several Dutch harbors relegating the towns to tourist status while Rotterdam dug new channels to keep itself viable.
When farmers first settled the land through the Homestead Act, many of them thought they would be rich by owning land. Unfortunately, setting up a farm takes a lot of capital, equipment, food, and building supplies. Many people homesteading had to get credit to buy the food they needed the first few years. If the homestead was far from the railroad, they had trouble selling anything to pay back the credit they had taken out. The railroad was critical to homestead success. The railroad counted on the farmers buying stuff shipped from elsewhere.
The success of Dallas Texas is partly due to having multiple railroads go through town. Dallas first paid the Houston and Texas Central Railroad $5000 to move seven miles to the west to run through Dallas. Then, they managed to get a law written so that the Texas and Pacific Railroad needed to cross the Houston and Texas Central Railroad within one mile of Browder's Spring which happened to be near the Dallas County Courthouse. Thus, the railroad changed its plans to run in the next county south of there and ran through Dallas instead. By having this crossing, Dallas became the center of commerce for north Texas and several more railroads were built through town.
In Texas, there are a number of "Farm to Market" roads which were built by the state from an increase in the fuel tax starting in 1949. Prior to that, a number of counties had built roads to facilitate getting farm goods to markets in the local area. These roads were a key part of expanding the economic base of the state.
In today's world, the Internet is the key to economic activity. Towns that have high speed internet can attract people while other towns languish. Many a small town has limited internet access. Only when they are connected to the wider economy do such towns start to thrive.