GithubHelp home page GithubHelp logo

Comments (7)

ovidiuch avatar ovidiuch commented on August 11, 2024

Assuming you have Yarn installed, all you need to do is

Development

  • yarn install
  • yarn dev:server in one terminal
  • yarn dev:client in another terminal
  • The server runs on port 4000 and the client on port 3000 (make sure both ports are available)
  • Open app at http://localhost:3000/

Production (you probably want this on your server)

  • yarn install
  • yarn build
  • yarn start
  • Entire app runs on port 300
  • I use Nginx to proxy port 80 to port 3000

from flatris.

suyuan168 avatar suyuan168 commented on August 11, 2024

thank you very much. Can the server and client be on the same server?

from flatris.

ovidiuch avatar ovidiuch commented on August 11, 2024

thank you very much. Can the server and client be on the same server?

Updated my initial comment

from flatris.

suyuan168 avatar suyuan168 commented on August 11, 2024

thank you very much. Can the server and client be on the same server?

Updated my initial comment

thank you very much.

from flatris.

suyuan168 avatar suyuan168 commented on August 11, 2024

hello~How to update the homepage data by setting up a server by myself? How often it will be updated.
This game is great. Thank you for your project.

from flatris.

ovidiuch avatar ovidiuch commented on August 11, 2024

hello~How to update the homepage data by setting up a server by myself? How often it will be updated.
This game is great. Thank you for your project.

You mean the stats? They update in real time.

To get the stats going on your server you need a Firebase account to use the Firebase Realtime database (free). You need to do two things:

  1. Set the FIREBASE_SERVICE_ACCOUNT environment variable when starting Flatris. It's picked up automatically here. More info related to Firebase credentials and service accounts here and here.
  2. Change the databaseURL to your own instance. It's currently hardcoded to https://flatris-forever.firebaseio.com, which is the official db for flatris.space.

Good luck!

from flatris.

cqw-acq avatar cqw-acq commented on August 11, 2024

hi,how to change the port?

from flatris.

Related Issues (20)

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.