TREES, PAVED STREETS, running water, a daily newspaper, slums, buses, prostitutes and policemen - all these appurtenances of modern living have come to Nouakchott, Mauritania's capital whose aptly chosen name means "windy city" in Arabic.

It was not always thus. For when Mauritania and most other French black African colonies were granted independence in 1960, everything had to be flown in - the captains, kings and even cutlery - and most was flown right back out again.

At the time the French remarked that they had spent more on independence celebrations and creating Nauakchott out of the desert than explorer Coppolani disbursed to buy the vast and mostly arid territory for France at the turn of the century.

Nouakchott originally looked like a Hollywood set with its single paved road, leading in from the then spanking new airport, ending abruptly in the wind-blown desert near the Atlantic Ocean.

Still Nouakchott was more than a surrealistic footnote to a thin French presence which only a 1934 claimed control - and nominal control at that - over a country whose proud Moorish nomads the French tended to idealize.

LAND OF NOMADS or not, the French belatedly realized that it really wouldn't do to have a newly independent nation continue to have its capital in St. Louis in the neighboring country Senegal just to the south.

Noulachott had to exist, moreover, since Morocco then was claiming, not without some historic justification, that Mauritania was part of greater Morocco and should be swallowed by the fatherland.

Now Morocco and Mauritania are bosom allies. They carved up between them the former Spanish Sahara in 1975, and face the wrath of Algerian-backed insurgents of the Polisario Front.

The guerrillas have demonstrated their displeasure in Nouakchott on two occasions - first in June 1976 and again last month - when guerrillas in Land Rovers succeeded in driving 800 miles across the desert, through Mauritanian defenses, and mortaring the presidential palace and nearby diplomatic compounds.

SUCH HAPPENINGS on the surface seem to have scarcely ruffled the capital and government, although foreign diplomats and the large French community are given to mistaking odds noises, especially at night, for the crump of incoming mortar rounds. A nightclub three miles outside the capital has lost 60 per cent of its business since the first attack.

Yet in a way such military activity is in keeping with the city's past, since it was built around an ancient floorish sand-hardened fort or Ksar .

Nouakchott at first lacked an adequate port - and still does - or an assured source of water or visible means of support. In those early days, the Americans were held in mild official disrepute for lavishing valuableo water from the capital's expensive and capricious desalinization plant on the embassy compound's swimming pool, lawn, trees and flowers.

Now greenery has become the rule, thanks to a Chinese-built pipeline that brings water from an underground deposit some 40 miles distant. It is said to be sufficient for another seven years.

Sewage is collected in tank trucks and used to water trees and truck gardens, a practice said to encourage widespread intestinal disorders.

Yet, the desert is flowering despite the war because Saudi Arabia and other oil-rich Arab countries are pouring in hundreds of millions of dollars. The capital inflow, if anything, has increased since Mauritania and Morocco are seen in conservative Arab circles as the victims of Soviet encouraged Algerian aggression.

AS PERHAPS IS iftting in a country whose official title is the Islamic Republic of Mauritania, various Arab governments are covering the capital with mosques. Morocco and Saudi Arabia have underwritten a giant mosque each. The Saudi one is rumored to cost $10 million.

Maverick Libya is financing five minimosques - and the Polisario insurgents as well - a state of affairs that does not appear to outwardly perturb President Moktar Ould Daddah.

Mauritana's approach to life and religion is illustrated by the recently ended Moslem preachers' conference here and the fact that the country's weekly holiday is not the traditional Islamic Friday, but a generous Western Saturday afternoon and Sunday, war or no war.

Still both the capital and country are changing rapidly. No longer do camels grace Nouakchott's streets nor do diplomats hunt gopher-like animals with spotlight-mounted Jeeps at night.

Soon after independence, more than two-thirds of Mauritania's sparse population were nomads wandering around a country four-fifths the size of Alaska.

Now those demographic proportions have been reversed and more than two-thirds of the population, estimated at just under 1.5 million, are considered to be sedentary. Not only has there been a natural increase in the prolific black sedentary population living along the Senegal River, which forms the country's southern boundary, but many Moorish nomads have abandoned their ancestral ways and settled down.

Trees and flowers inside Nouakchott's original city limits now give way to often unpaved, shadeless streets in two mushrooming outlying areas which reflect the influx during the terrible drought that afflicted the Sahel in the early 1970s.

The capital's population has tripled in five years - from 50,000 to 150,000 with as many as 40,000 others listed as transients by officials.

The newcomers are a mixture of blacks, Moors of all skin pigmentations and their former black slaves who remain in the Arabic cultural orbit. The government has put in water pumps and rudimentary dispensaries.

If the nomads' tents remain popular, the newcomers also seem attracted to homes made of wooden packing cases recovered from the wharf where cargoes are unloaded by lighter. Later, many of the newcomers move into cinder block housing.

THE UNMISTAKABLE sign of urbanization is the omnipresent foam rubber mattress which has won over even the most sniewy Mooorish desert nomad. Such touches of soft Western living, like almost everything else on sale in Nouakchott, are imported.

For Westerners, Nouakchott has the dubious distinction of being one of the world's most expensive places, topped only by Guinea's capital Conakry, Zurich and Geneva.

The causes are a combination of Mauritania's uncovertible currency - the government quit the limiting, but supportive convertible franc zone, but is rumored to be seeking a way back in - high customs duties, inadequate transport and port facilities and outrageous profit margins.

Locally grown string beans go for $1.55 a pound and it's estimated that imported toilet paper costs eight times more here than in France.

Money, of course, is the root of all evil. Recently, 15 prostitutes and five pumps - all foreigners - were sentenced to heavy prison terms and/or fines and the country's only daily newspaper, Chaab, blamed the phenemenon on the "behavior of certain of our rich citizens." In a blase comment, the newspaper added that, "in our time prostitution has become a profession like another - you just have to learn it."

Still, the president, who has ruled since mauritania first achieved self-rule before full independence, has never forgotten that he and his ancestors got along without cars, roads, refrigerators or any other 20th century gadget. Only recently has he agreed to put in the first air conditioner in his modest presidential palace and it's said to be installed in the guest chamber.