How to map key to quit neovim

It is possible, I have just checked it.

map('n', '<leader>s', ':wa <bar> <esc>:qa<CR>')

Feel free to replace <leader>s with your own combination you feel the most comfortable with.