Adelanto, California, is what's known as a "drive-through town." It's a dusty plot of desert surrounded by Joshua trees and dilapidated factories. Few outsiders stay long.

Now, the sleepy city in San Bernardino County wants to establish itself as a hotbed for large-scale cultivation and innovation in weed.

There are 360 acres zoned for growing medical marijuana in Adelanto (recreational marijuna is newly legal and California has yet to give licenses for growing it). It's among the first struggling desert cities to turn to weed as a cure for its economic woes, the Los Angeles Times reports.

Aging factories and warehouses are being transformed into cultivation warehouses, cannabis-oil extraction facilities, and a host of other projects that support California's booming medical marijuana market. Frontier Enterprises, a major home developer in Southern California, broke ground in February on a 30-acre industrial park that will house 21 marijuana cultivators. It's big enough to fit nine Costo stores and may someday supply California's massive demand.

Californians spent $1.8 billion on medical pot in 2016 — about one-third of the legal market in North America last year, according to Arcview Market Research. The state's recreational market is expected to roll out in summer 2018, which could send industry revenue sky-high.

Adelanto Mayor Richard Kerr told LA Weekly he expects revenue generated from taxes on marijuana cultivation to inject millions into the city coffers. REUTERS/Lucy Nicholson

California will not start issuing licenses for recreational marijuana cultivation until early next year, but Adelanto wants to get a leg up on the competition — namely, other communities in the Salinas Valley that have experience in agriculture and the right climate for marijuana farming. The city has already approved ordinances allowing medical marijuana cultivation at an industrial scale.

Investors with backgrounds in real estate development and law are migrating to the town in the hopes of striking it rich in legal weed.

Adelanto has struggled to recover since a major employer, the George Air Force Base, closed in 1992. About 40% of the population lives below the poverty line. Many of the 32,000 residents work in an immigration detention center (the largest in the state), as well as nearby jails.

A communal area is seen at the immigration detention center in Adelanto, California. Lucy Nicholson/Reuters

In 2014, Adelanto was in debt for $2.6 million. There were talks to disband the city and file for bankruptcy. A year later, the first large marijuana cultivation site sprung up. The deficit is now between $500,000 and $750,000. The major credits the recovery, in part, to revenue generated from taxes on marijuana cultivation, among other projects that create tax revenue.

In an interview with LA Weekly, Mayor Richard Kerr said he expects pot taxes to inject millions into the city coffers. Those funds may pay for new housing, shops, and a concrete plant.

It remains to be seen if Adelanto can make itself the Silicon Valley of medical marijuana, in spite of competition from neighors including Cathedral City and Desert Hot Springs, which have also attracted marijuana cultivators and developers in recent months.

Some residents of Adelanto worry that the new "green rush" will make the city too expensive for them to live in, as marijuana industry development drives up real estate prices.

Former mayor Cari Thomas told the LA Times that marijuana cultivation as a revenue stream for the city is "just not a way I would have chosen. It's kind of uncharted territory."