+1 (229) 255-3712
glass
pen
clip
papers
heaphones

  

1.YourREADME.mdfile must include your name, the assignment (i.e.Project 2), and data due.

2. You must set up a secure server with a domain name that allows a front-end application (e.g.
React or native phone apps) to access it over https with no complaints about the site being
untrusted. You can do this using any cloud provider you want (e.g. AWS, Azure, Google,
etc.) but one way to do it is to follow: https://www.digitalocean.com/community/tutorials/
how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 The droplet will cost $6 per
month, so it is cheap and you won’t even need it for more than a month or two (keep it up to
use for your Final Project). When reading the instructions, a few notes that will help you are as
follows:
(a) create an ubuntu 20.04 $6 per month droplet choosing Basic shared CPU. There is no need
for Block Storage, you can pick any US region you want, and you can set up Monitoring
and IPv6 for free if you want, but you don’t need either of those for our assignments. You
MUST use ssh keys with a passphrase rather than password authentication. After the
initial setup with root, you must also set up another user with your own username with sudo
access. You must take a screenshot and call it ssh keys.png and include it in your repository.
It should provide ALL the information above, and clearly show your own account, as in the
figure below:
One important note while setting this up! During the initial setup, you should remain logged
in as root in one terminal while creating your other user, testing that your keys work, and
getting up sudo to make sure everything works properly. Test everything before logging out
as root! If anything fails, you could lose access to your server! After your are done with your
setup, should run apt update and apt upgrade so all is up to date.
(b) get your free domain at Freenom as noted on the page
(c) follow “this introduction to DigitalOcean DNS”
(d) when setting up domains with “Quickstart”, make sure to add A records for your domain
and for www with your domain (e.g. dplante.tk and www.dplante.tk) and use your droplet’s
IP address. On the “Quickstart” page, step 5 links you to “pointing your domain name
to DigitalOcean’s name servers”. On that page, it does not show you how to do this with
Freenom. But it doesn’t matter. Go to the Freenom page and pick your domain, then under
“Management Tools Nameservers”, choose “custom name servers” and set them to the
ns1.digitalocean.com (and ns2 and ns3) like the documentation shows.
(e) follow “How To Install Apache on Ubuntu 20.04” but note that your domain still does not
work; but you can go to the actual IP address (e.g. http://174.138.59.83/) and will get message
showing your virtual host works (e.g. ”Success! The dplante.tk virtual host is working!”)
(f) then follow all the steps starting at Step 1: Installing Certbot. You will know things
work when your page comes up using the domain name and shows a valid certificate in the
lock to the left of the URL. In Step 4:, when asked about a redirect, be sure to set up with
option 2 to redirect HTTP traffic automatically to HTTPS

Figure 1: SSH Login Ubuntu
(g) include an image in your repos called
showing your page over https with the lock
selected and expanded to show details and that you have a valid certificate when the page is
opened in the browser.
(h) finally, in your README.md file in your repository, along with your usual information (e.g. your
name, the class, that this is Project 2, etc.), you MUST include your domain name for me to
test all of this; for me that would be Domain: dplante.tk.
3. Using https://www.section.io/engineering-education/node-… as your
guide, for the next part of your assignment, create an API server on your cloud instance. After
running npm install, be sure to run npm audit fix to fix many/most/all of the vulnerabili-
ties! You must install node and mongodb on your server and to open port 2400 using ufw. One
good reference for installing mongodb is https://www.digitalocean.com/community/tutorials/
how-to-install-mongodb-on-ubuntu-20-04. You should also check the Mongoose doc https:
//mongoosejs.com/docs/ to understand how data is stored in a MongoDB NoSQL database. You
should work through every step to understand what is happening: using use() and next(), using
exports to export a module, and using all the tools for authentication through the use of tokens.
To run the app, you will need to install mongodb on your server. You are to use postman to show
that you can signup an account with your name and password on your own cloud server. You
must take a screenshot of the POST and GET requests running in postman with the results showing
the token. Include these two images in your repository in the main directory called login.png and
signup.png.
See https://stackoverflow.com/questions/11744975/enabl… for help
on getting your express app to work over https in addition to http. You must also open the two
ports, 8080 and 8443, in your server’s firewall to be accessible externally