Skip to content

Aktyn/BertaSnakes

Repository files navigation

Berta Snakes

Multi-player browser game.

How to setup project

  • Make sure to have nodejs, npm and git installed on your system
  • Clone repository:
    git clone https://github.com/Aktyn/BertaSnakes
    cd BertaSnakes
  • Install necessary dependencies
    npm install
  • DEVELOPMENT MODE

    • Run client with:
      npm run client:dev
      (make sure port 3000 is not in use)
    • Run server with:
      npm run server:dev
  • PRODUCTION MODE

    • Compile client source:
      npm run client:publish
    • Compile server source:
      npm run server:publish
    • Run server with:
      npm run server:run
      (client files shall be published under port: SERVER_PORT specified in src/common/config.ts, default value is 5348)
  • SERVER CONFIGURATION

    • All necessary ports as well as host address are specified inside src/common/config.ts
    • Server uses MongoDB to store accounts data, sessions, etc. MongoDB credentials should be given in parameters while running server
    • Server send emails via nodemailer from gmail account. Gmail address and password must also be specified while running server. You should allow access of unsecured applications in google account settings to be able to send mails remotely from server.
    • Summarizing, the complete command to run server with all functionality is:
      npm run server:run MONGO_USER="value" MONGO_PASS="value" EMAIL_ADDRESS="[email protected]" EMAIL_PASSWORD="value"
    • Same goes for running server in dev mode (npm run server:dev)

preview

preview

preview

preview

preview

preview