During World War II, so many New Yorkers flocked to the Brooklyn Navy Yard to build warships that it was nicknamed the Can-Do Shipyard.

In recent years, it has become a hub of independently owned and innovative manufacturers that include artisanal distillers and industrial metal fabricators.

But with the coronavirus ravaging New York City, the old Navy Yard — one of few large manufacturing centers remaining in the city — is again pitching in during a national crisis as a hub for fighting the pandemic, producing desperately needed medical supplies, such as face shields, hand sanitizer and hospital gowns.

It has returned to “a wartime factory,” said Mayor Bill de Blasio as he toured a former shipbuilding hangar there on Thursday.