Giter Site home page Giter Site logo

pokerjkji's Introduction

poker

A poker implementation written in Rust.

The IO is implemented as a websocket server using the Actix framework.

To run the server locally, use cargo run. Then open a browser to local host for the playable front end UI.

You can also use cargo run -- --help for more settings.

Example:

cargo run -- --ip 127.0.0.1 --port 8080

You can also run it inside a docker container via:

docker build --tag poker --file Dockerfile .

and then

docker run -p 8080:8080 poker

Note: in this case, you must go to your actual ip address in the browser, since localhost won't work with the docker container.

React UI

The UI is handled by React.

Setup

First make sure you have Node.js and npm installed.

cd react-ui
npm install

Run Locally

For live development you can run the server and React UI seperatly.

  1. First start up the server.

     cargo run -- --ip 127.0.0.1 --port 8080
    
  2. Then start the React UI.

     cd react-ui
     REACT_APP_SERVER_PORT=8080 npm start
    

Build UI

You can simply call the following.

cd react-ui
npm run build

If you need to specify the port of your server then you can run the following build command.

cd react-ui
REACT_APP_SERVER_PORT=8080 npm run build

pokerjkji's People

Contributors

ajstarna avatar mdfeist 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.