- Navigate into the /backend directory and run
npm install
- Add new file to backend/config/dbConsts.ts. It should be based on the exampleDbConsts.ts file but need to add the DB password and cluster name.
npm start
- Run ngrok by navigating to the directory containing the 'ngrok.exe' and running
./ngrok http 3000
(ngrok is currently located in my /Downloads directory) - Copy the ngrok 'forwarding' port (for example
http://98380aba1507.ngrok.io
). and paste it in the fetcher as the route.
https://ourcodeworld.com/articles/read/977/how-to-deploy-a-node-js-application-on-aws-ec2-server
- Navigate to directory holding my AWS
.pem
keyfile. - Run
ssh -i "awsKeyPair.pem" ubuntu@ec2-54-242-127-157.compute-1.amazonaws.com
in linux terminal or Windows using PUTTY.
This is kinda dumb. Also, it will delete the keys and URL files, which will need to be added manually, via SSH and VIM, which is super dumb.
- Connect via SSH (see above).
- Delete code files (
rm -rf
). - Git clone new repo version.
- WIll need to use github access token instead of password, when trying to clone. New Token can be generated in Github.com/settings/token, or can be found locally on my machine. in
githubToken.txt
. - Delete unneeded RN app directory.
- navigate into backend directory.
npm install
- Navigate to
config
directory and createkeys.ts
,dbConsts.ts
andfirebaseAdmin.json
. Copy and paste, using vim. (This is so dumb). Make sure there are no trailing, empty, lines after the code. - PM2 run