Giter Site home page Giter Site logo

personal-website's Introduction

Personal Website

This is where I put whatever I want to host on the internet. I plan on installing multiple unrelated functionalities here, and to see them, you can check out the website here.

Running the Production Server

For reference, I am using a VPS with Almalinux 8.

Requirements

  • Rust (cargo)
  • PostgreSQL
  • Npm (Node)
  • Nginx

Steps

  1. Host the backend server on localhost. For now, I am doing this using cargo run. See these instructions for more detals.
  2. Setup the frontend server as specified here. Then, build the frontend server using npm run build.
  3. Host the frontend server using pm2. First, install using npm install pm2. Then, run the frontend using pm2 start npm --name "your_server_name" -- start
  4. Forward the frontend using nginx. Add the following config to your nginx.conf file. The config was taken from the example from this blog. Then, restart the nginx server.
server {
    server_name  any_server_name;
    index index.html index.htm;
    access_log /var/log/nginx/nodeapp.log;
    error_log  /var/log/nginx/nodeapp-error.log error;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:4500;
        proxy_redirect off;
    }
}

personal-website's People

Contributors

knguy22 avatar

Stargazers

Marcus Kalander avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.