Skip to content

rajp20/unityx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity X

This website is mainly for developing and learning various technical aspects.

Table of Contents

Installation

Run the following command to install node packages.

npm i

Configuration

Local

Add the following to /etc/hosts for sub-domains:

127.0.0.1 example.com
127.0.0.1 rajpatel.example.com
127.0.0.1 jakemaschoff.example.com
127.0.0.1 othersubdomain.example.com

Production

Forwarding port 80 to 8080 and port 443 to 10443. (Add these commands to /etc/rc.local, also change eth0 to your network interface)

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

Operating the App

Local

To Start

pm2 start config/ecosystem.config.js

Once the app is running, visit localhost:8000.

Note: If you run into issues regarding "pm2" not being installed, run this command before running the above command.

sudo npm i -g pm2

To stop

pm2 stop config/ecosystem.config.js

Production

To start in production

pm2 start config/ecosystem.config.js --env production

Deploying the App

You'll need to add an SSH key to the server before you can run any of the following commands.

Set up
pm2 deploy config/ecosystem.config.js production setup
Starting
pm2 deploy config/ecosystem.config.js production
Update
pm2 deploy config/ecosystem.config.js production update

About

Unity X

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •