API for gia-trainer using Express.js
root user access:
mysql -u root -p
"no-user" access:
mysql
- MySQL for database management (hosting with AWS RDS).
- bcrypt for hashing passwords.
- jwt for authenticaing requests that require verification.
- Let's Encrypt for ssl certification generation via certbot
- express js for serving api
- nginx for actings as the reverse proxy
- Passport for authentication middleware
gia-trainer.com
- Changes to this repo must be pulled from the server. See the commands below for guidance.
Connect to ec2 instance:
ssh -i ~/Desktop/ssh/aws-key.pem [email protected]
Open bash config file:
sudo vim ~/.bashrc
Make sure to reload the configuration with source ~/.bashrc
after saving any changes.
Get status of nginx:
sudo systemctl status nginx
Restart nginx:
sudo systemctl restart nginx
Get nginx error log:
sudo tail -f /var/log/nginx/error.log
Get systemd logs (for viewing server console logs):
sudo cat /var/log/messages
Test nginx config file is valid:
sudo nginx -t
Transfer file to ec2 instance:
scp -i ~/Desktop/ssh/aws-key.pem <sending_file_path> [email protected]
Pull changes from remote repo:
pull_gts
Build server:
build_gts
Restart server:
reload_gts
Edit nginx config file:
edit_nginx
Edit bash config file (for changing aliases):
edit_bash
Reload bash config file:
reload_bash
Show systemd logs:
show_logs