Poker Framework - @pokerscript
  • Introduction
    • Prerequisites
    • Server
    • Installations
  • Deployment
    • Backend
    • Frontend
  • Connector APIs
    • Plateform API
    • SignUp API
    • LogIn API
    • Profile API
    • Profile Update API
    • Chips Update API
  • Quickstart Guide
    • Primary Setup
    • Logo & Branding
    • Stake Configuration
    • Blind Levels
    • MTT Payouts
    • SnG Payouts
    • Web3 Settings
    • Buy Hours Package
    • Avatar Manager
    • Crypto Payments
    • Table Gifts
    • Tournament Setup (MTT)
Powered by GitBook
On this page

Was this helpful?

  1. Deployment

Frontend

Deploying an online poker platform built with ReactJS follows similar steps to deploying other React applications. Here's a detailed guide to assist you in the deployment process.

  1. Configure Environment Variables: (.ENV)

    • Open your ReactJS project and open the .env file that exists in the root directory.

    • Add your environment variables:

      REACT_APP_SOCKET_URL=<your_socket_url>
      REACT_APP_URL=<your_app_url>
    • Replace <your_socket_url> and <your_app_url> with the appropriate URLs for your application.

  2. Create a Production Build:

    • Open your terminal.

    • Navigate to your project directory.

    • Run the command:

      npm run build

    This will create an optimized production build of your React app in the build folder.

  3. Move Build Files to Server:

    • Connect to your server using SSH or FTP.

    • Navigate to /var/www/html/ directory (or the directory configured for your virtual host).

    • Copy the contents of the build folder (created in step 2) to this directory.

      cp -r /path/to/your/build/* /var/www/html/
    • Make sure the permissions are set correctly for the files and folders in this directory.

  4. Configure Server (if necessary):

    • If you're using a virtual host, make sure it's properly configured to point to the directory where you've placed your build files.

    • Ensure that any necessary server configurations (like CORS, HTTPS setup, etc.) are properly set.

  5. Check Deployment:

    • Once the files are successfully copied, you can check your application by visiting the URL specified in your .env file (REACT_APP_URL) in a web browser.

    • If you're using a custom domain or virtual host, make sure DNS records are properly set up to point to your server.

  6. Troubleshooting:

    • If you encounter any issues, check server logs for any error messages.

    • Ensure all dependencies are installed and configured correctly.

By following these steps, you'll be equipped to deploy your online poker application onto your server, making it live for users to access.

PreviousBackendNextConnector APIs

Last updated 10 months ago

Was this helpful?