***Not a teacher***
Therefore, at the instant when you are first introduced to somebody, the first would be most appropriate. By using 'meeting you', the second one is drawing attention to the process of meeting the person, and is thus not so appropriate at the moment when you are first introduced.
Once there has been some duration to the meeting (which could potentially be as little as a couple of sentences, or could include much more than this), either would be appropriate, but the second one will still be bringing emphasis to the process.
Similarly when you are then saying goodbye to the person you have just met:
"It was nice to meet you" - statement about the fact of having met them
"It was nice meeting you" - 'I have enjoyed the conversation and coffee with you' - statement more about the duration of the meeting process.
Student or Learner