Code Monkey home page Code Monkey logo

dragncards's Introduction

DragnCards

Multiplayer online card game written in Elixir, Phoenix, React, and Typescript.

Local Instance

The local instance of Dragncards serves a purpose for those looking to develop, contribute, or play Dragncards in an offline environment.

Pre Requisites

This environment uses HashiCorp Vagrant to stand up Dragncards within a virtual machine. This requires the following:

These can be installed on macOS, Windows, or Linux.

Run Dragncards

  • Clone the Dragncards repository locally
    • git clone https://github.com/seastan/dragncards
  • From the dragncards change to the vagrant folder
    • cd vagrant
  • Run Vagrant
    • vagrant up

Once this is done browse do http://127.0.0.1:3000.

Default Users

The default users are

If you prefer different names please update the alias value in vagrant/sql/users.sql and run vagrant up.

Multiplayer

If you're interested in running multiplayer games where others connect to your instance you will require the following changes. Where IPADDRESS is located down below you will need to change

NOTE: This must be done each time you rebuild as this is a deviation from the main branch.

Replace 127.0.0.1 with your required IPADDRESS. This may be a public IP, private IP, or something else. dragncards/frontend/package.json

    "start": "REACT_APP_WS_URL=ws://127.0.0.1:4000/socket npm-run-all -p start:js",
  
    "start": "REACT_APP_WS_URL=ws://IPADDRESS:4000/socket npm-run-all -p start:js",

dragncards/backend/config/config.exs

The backend can listen on any addressed opposed to localhost. Comment out the following and replace with 0.0.0.0

  url: [host: "0.0.0.0"],
  #url: [host: "localhost"],

dragncards's People

Contributors

seastan avatar mreishus avatar dependabot-preview[bot] avatar pandom avatar sickoscar avatar pduran5 avatar funkymonkeymonk avatar chrisstanford avatar dependabot[bot] avatar

Watchers

James Cloos avatar

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.