I am able to run my node server on an EC2 instance by SSH-ing into the server and running the command node index.js when inside of the src file. The server works fine, but the issue is that I have to persist the SSH connection to the EC2 instance, otherwise it terminates the server process. I'm sure I'm doing something wrong, but I couldn't find a clear cut and dry solution online without getting too much into the weeds.
Also for anyone wondering, I SSH-ed into my github and installed git on the EC2 instance in order to pull the code from the repository to the instance, instead of using CodeDeploy. The reason is that I was getting vague errors with CodeDeploy like "there was an issue deploying your revision", so I decided to go the manual route for uploading the code. So I could use some solutions to common "gotchas" in this area as well. Thanks.