Skip to content

enijar/board-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Board Game

Board game playground project.

Getting Started

cp server/env.example.ts server/env.ts
npm install
npm start

Production Build

cp server/env.example.ts server/env.ts
npm install
npm run build

# Install PM2 globally to manage the server process
npm add -g pm2

# Start the server process with pm2
pm2 start --name app server/build/index.js

NGINX Config

server {
  listen 80;
  server_name _;

  # /api prefixed requests are forwarded onto the server
  location /api {
    proxy_redirect off;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://localhost:3000;
  }

  # All routes are handled by the client
  location / {
    index index.html;
    absolute_redirect off;
    root /var/www/app/client/build;
    try_files $uri $uri/ /index.html =404;
    add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
  }
}