[go: nahoru, domu]

Skip to content

Beikewzh/Lets-Make-a-Rusty-Connect-4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Let's Make a Rusty Connect-4

Quick Start

Firstly, we open two terminals. 
One for Server.
One for client. 

Server

  1. Update dependencies as recorded in the local lock file
cargo update
  1. Update rust toolchain installer
rustup update
  1. Use Rust Nightly
rustup override set nightly
  1. Download MongoDB (Followed the MongoDB offical website)
https://www.mongodb.com/docs/manual/administration/install-community/
  1. Set up Server and open the MongoDB shell
mongod
mongo
  1. Initialized the Database If we already have ServerDB, then
use ServerDB
db.dropDatabase() 

else

use ServerDB
db.createCollection("users")
db.users.createIndex({"username": 1}, {unique: true})
db.createCollection("scores")
db.scores.createIndex({"username": 1}, {unique: true})
  1. Run the Server
cargo run

Client

  1. Install Trunk (a WASM web application bundler for Rust)
cargo install trunk
  1. Install the wasm-bindgen Command Line Interface
cargo install wasm-bindgen-cli
  1. Run the client with specific port
trunk serve --port XXXX
  1. Go the the website and start application
localhost:XXXX

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published