Skip to content

Frascth/BE-FrontlinePasswordManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontline Back-End Deployment

Step 1: Install NodeJS and NPM using nvm

Install node version manager (nvm) by typing the following at the command line.

sudo su -
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Activate nvm by typing the following at the command line.

. ~/.nvm/nvm.sh

Use nvm to install the latest version of Node.js by typing the following at the command line.

nvm install 18.18.2

Test that node and npm are installed and running correctly by typing the following at the terminal:

nvm use 18.18.2
node -v
npm -v

Step 2: Install Git and clone repository from GitHub

To install git, run below commands in the terminal window:

on debian linux:

sudo apt-get update -y
sudo apt-get install git -y

on aws linux:

sudo yum update -y
sudo yum install git -y

Just to verify if system has git installed or not, please run below command in terminal:

git --version

This command will print the git version in the terminal.

Run below command to clone the code repository from Github:

git clone https://github.com/Frascth/FrontlinePasswordManager.git
git clone https://Frascth:[email protected]/Frascth/BE-FrontlinePasswordManager

Get inside the directory and Install Packages

cd FrontlinePasswordManager
npm install

puppeter need aditional chrome dependency or chrome itself

install chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

or

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f

install dependency only

sudo apt-get install libx11-xcb1 libatk-bridge2.0-0 libcups2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libx11-xcb1 libxcomposite1 libasound2 libatk1.0-0 libatk-bridge2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libcairo2

Start the application To start the application, run the below command in the terminal:

npm run prod

Step 3: Install and Configure Nginx

install and get default config nginx

sudo apt-get update
sudo apt-get install nginx

clean uninstall Nginx

sudo systemctl stop nginx
sudo apt-get remove --purge nginx nginx-core nginx-common nginx-full nginx-light nginx-extras --y
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -r /etc/nginx/
sudo apt-get update

configure reverse proxy

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;

        root /var/www/html;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                proxy_pass http://localhost:8080;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        # pass PHP scripts to FastCGI server
        #
        #location ~ \.php$ {
        #       include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        #       fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        #       # With php-cgi (or other tcp sockets):
        #       fastcgi_pass 127.0.0.1:9000;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}
}

Step 4: Install and Start Server with PM2

install pm2

sudo apt-get update
sudo apt-get install pm2

start app with pm2

pm2 start BE-FrontlinePasswordManager/src/server.js --name BE-Frontline
pm2 save
pm2 startup

Step 5: Whatsapp Maintenance

if Whatsapp barcode for login not working try to clear cache of Whatsapp in server

for windows

npm run ccw

for linux

npm run ccl

About

Frontline Password Manager back-end for managing account

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published