Thanks vanshees71, that was interesting. I did, however mean the lagrangian density for the klein-gordon or dirac field.
One gets the feynman diagram vertices for EM by demanding local gauge invariance in the lagrangian of the field(i read this in chap 11.3 in griffiths introduction to...