Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I install it on my own server? #83

Open
suyuan168 opened this issue Feb 13, 2020 · 7 comments
Open

Can I install it on my own server? #83

suyuan168 opened this issue Feb 13, 2020 · 7 comments

Comments

@suyuan168
Copy link

Can I install it on my own server?

@ovidiuch
Copy link
Owner

ovidiuch commented Feb 13, 2020

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

@suyuan168
Copy link
Author

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

@ovidiuch
Copy link
Owner

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

Updated my initial comment

@suyuan168
Copy link
Author

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

Updated my initial comment

thank you very much.

@ovidiuch ovidiuch pinned this issue Feb 13, 2020
@suyuan168
Copy link
Author

suyuan168 commented Feb 14, 2020

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.

@ovidiuch
Copy link
Owner

ovidiuch commented Feb 14, 2020

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!

@ovidiuch ovidiuch mentioned this issue Apr 26, 2020
@cqw-acq
Copy link

cqw-acq commented Jun 4, 2024

hi,how to change the port?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants