Code Monkey home page Code Monkey logo

Comments (1)

wfjsw avatar wfjsw commented on July 25, 2024

How to install manually:

  • Compile and run https://github.com/the-ditanian-fleet/sse-server
    • cargo build --release and it's somewhere in target/ just in case
    • Set the host and port in Rocket.toml
    • Set a random SSE_SECRET in the environment variable
  • Populate a MySQL/SQLite with https://github.com/the-ditanian-fleet/waitlist/tree/main/backend/sql.
    • Do it now and you will need this later when compiling the backend.
    • If you use PostgreSQL you are a bit out of luck. It is doable but you need to edit these SQL commands as pgsql use a different template string (? => $n)
    • Set the environment variable (preferably in a .env file) DATABASE_URL according to this: https://github.com/launchbadge/sqlx#compile-time-verification
  • Compile and run the backend
    • Remember to have your database ready or you will encounter weird errors.
    • Set the host and port in Rocket.toml
    • Rename config.example.toml to config.toml and fill it.
      • token_secret is some random string
    • Before you run, execute shrink-sde.sh to fetch SDE.
  • Setup Nginx
    • Serve the frontend dir in /
    • Serve the backend in /api
    • Serve the SSE-server somewhere you prefer.
      • If you don't care about the bad looks, prepare 2 sub-domains. One for backend and one for sse-server.
      • However if you care, use proxy_redirect to rewrite redirections to SSE-server to somewhere local. (Or patch the sse.rs if you prefer)
      • Remember to disable proxy buffering and leave keep-alive on.
      • It is possible to Cloudflare it but changes have to be made to
        1. Return a comment as soon as a connection is established
        2. Send a keep alive comment every 30s

from waitlist.

Related Issues (12)

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.