Hmmm.... That doesn't sound like a wise practice. I'd always want to keep my private key secured on my local machine. I think I'd just set my ssh agent to submit the key passphrase automatically.
Discussion
Standalone web apps that aren't intended to be shared wouldn't normally need to keep keys from being hard coded. That constitutes a lot of projects on GitHub.