Skip to content

A JavaScript web app to generate and host personal websites

Notifications You must be signed in to change notification settings

louisheath/shortfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shortfolio

Shortfolio allows anyone to create their own clean and professional personal website, and have it hosted as a page on the shortfolio site.

Server instructions

Server is running on a Microsoft Azure VM.

It runs on port 3000. We forward https requests from port 443 to 3000, and http requests from port 80 to 8080, where a separate instance of express redirects their url to use https.

sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 3000
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80  -j REDIRECT --to-port 8080

To view these rules use iptables -L -t nat --line-numbers.

To delete the first rule from the PREROUTING chain use sudo iptables -t nat -D PREROUTING 1.

The npm package forever is used to run the server in background through the ssh terminal.

forever start server/index.js

Use forever list to see currently running processes.

HTTPS

Install certbot on the VM.

sudo certbot certonly --webroot -w /home/lh16421/shortfolio/public/ -d shortfolio.site -d www.shortfolio.site

To pull this off the website needs to be accessible via standard HTTP, rather than HTTPS.

Once generated, put the paths to the key and cert files into environment variables HTTPS_KEY and HTTPS_CERT respectively.

In order for node to read these files it needs higher level permissions, so sudo it up.

Todo

  • make mobile friendly
  • allow users to change their password
  • add link at bottom of personal sites to shortfolio.site

About

A JavaScript web app to generate and host personal websites

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published