openEtG is an open source fork of the Flash ccg Elements the Game.
- Download all dependencies listed below
- Clone the repository:
git clone https://github.com/serprex/openEtG && cd openEtG
- Install packages:
npm install
- Generate asset atlas:
npm run build-atlas
- Copy sample configuration files:
cp config-sample.json config.json cp wsconfig-sample.json wsconfig.json
- Configure
config.json
to connect your instance of postgresql- Specify the http port you will listen on for web service requests
- This should match your
wsconfig.json
wsport
- This should match your
- Specify the user to connect your postgres server
- Ensure that you created the user on your postgres server and provided proper permissions
- Specify the host of your postgres server
- Specify the port number of your postgres server
- Specify the database name you created on your postgres server
- If certificates are required to access your instance, they can be included under the
certs
key
- Specify the http port you will listen on for web service requests
-
psql -f scripts/initdb.sql
will generate initial schema
- Install WASM rust target
rustup target add wasm32-unknown-unknown
- Build
npm run build
- Run server
cd ./src/rs/server
cargo run
- Add unit tests to
lib.rs
- To run unit tests:
cargo test --manifest-path=./src/rs/Cargo.toml