\begin{appendices}
\chapter{Example Appendix}
\label{chapter:appendix-a}
\begin{lstlisting}
Some code
\end{lstlisting}
\end{appendices}