Death of a Salesman was first published and performed in 1949. Viking Press of New York published it in March, 1949. The play is primarily set in Brooklyn, New York at Willie Loman's house but also takes place in Boston and Manhattan. Arthur Miller wrote the play in 1948, although it is based on his father's experiences as a salesman during the rough times of the Great Depression of the 1930s.
More important than publication date or city is the zeitgeist or spirit of the time in which it was written. In The Lonely Crowd, published in 1950, David Reisman argues that after World War II, Americans moved from being inner-directed, meaning primarily guided by moral codes, to outer-directed or primarily influenced by how other people perceived them. Death of a Salesman critiques the outer-directed life by revealing Willy's inner emptiness while also mirroring a brutal economic period that people were finally able to look back on and try to understand now that a new post-war prosperity had arrived.