Skip to content

A FullStack CRUD Application where users can Post , Edit and Delete Memes.

Notifications You must be signed in to change notification settings

kelvin0179/Crio-CWoD-XMeme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XMeme

Local Run Backend

  • To run the Backend locally on Port 8080 and 8081
cd Backend
npm install && npm run server
cd..

Backend Deployment

  • Create an EC-2 instance in Aws on Ubuntu 18.
  • Associate it with an Elastic IP.
  • Clone your App.
  • Install Dependencies on Server.

PM2 Server

cd Backend
sudo npm i pm2 -g
pm2 start server.js
pm2 startup ubuntu
  • You should now be able to access your app using your IP and port. Now we want to setup a firewall blocking that port and setup NGINX as a reverse proxy so we can access it directly using port 80 (http)

Setup UFW Firewall

sudo ufw enable
sudo ufw status
sudo ufw allow ssh (Port 22)
sudo ufw allow http (Port 80)
sudo ufw allow https (Port 443)

Install NGINX and configure

sudo apt install nginx
sudo nano /etc/nginx/sites-available/default
  • The Comments should be sufficient to guide you.
# Check NGINX config
sudo nginx -t

# Restart NGINX
sudo service nginx restart

Add SSL with LetsEncrypt

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

# Only valid for 90 days, test the renewal process with
certbot renew --dry-run

Local Run Frontend

  • To run the Frontend locally on Port 3000
cd Frontend
yarn install && yarn start

Frontend Deployment

  • To Deploy on Netlify
npm run build
npm install netlify-cli -g
netlify login
netlify deploy --dir=public --prod

About

A FullStack CRUD Application where users can Post , Edit and Delete Memes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published