Skip to content

Commit

Permalink
Start DEVELOPMENT.md for full development instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ddimaria committed Jan 18, 2024
1 parent 3f556a5 commit 30252cb
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ If you have any problems getting the project to run locally, please create an is

In order to run the front-end and/or the server locally, you must have all the environment variables configured in `.env.local` (and `quadratic-api/.env.local` if you’re running a local server). You can grab the values from [our team Notion page](https://www.notion.so/Env-Variables-78b1a1da19d0421993abe8c449e51496?pvs=4) or by asking a team member.

1. Start everything in one thread `npm start`
1. Start everything in one terminal: `npm start`

### Run front-end locally

1. `cd quadratic-client`
2. `npm i` to install dependencies
3. Configure `.env.local` values
3. Configure `.env.local` values: `touch .env.local`
4. (a) `npm start` to run in browser or `npm run dev` to run with Electron; or (b) `npm run watch:front-end` to run in browser with automatic wasm rebuilding

#### Note:
Expand Down
43 changes: 43 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Development

Let's get everything setup to develop on Quadratic!

- [Development](#development)
- [Install Dependencies](#install-dependencies)
- [Develop on the Frontend](#develop-on-the-frontend)
- [Develop on Quadratic API](#develop-on-quadratic-api)
- [Develop on Quadratic Core](#develop-on-quadratic-core)
- [Develop on Quadratic MultiPlayer](#develop-on-quadratic-multiplayer)
- [Develop on Quadratic Files](#develop-on-quadratic-files)


## Install Dependencies

First, follow the instructions to install:
1. [NVM](https://github.com/nvm-sh/nvm)
1. [rustup](https://www.rust-lang.org/tools/install)
1. [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
1. [Docker Desktop](https://docs.docker.com/desktop/)

Start Docker Desktop after installing.

```shell
# install node version 18
nvm install 18

#install the WASM toolchain
rustup target add wasm32-unknown-unknown

# install cargo watch
cargo install cargo-watch
```

## Develop on the Frontend

## Develop on Quadratic API

## Develop on Quadratic Core

## Develop on Quadratic MultiPlayer

## Develop on Quadratic Files
2 changes: 1 addition & 1 deletion quadratic-rust-shared/src/pubsub/redis_streams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn from_key(key: &str) -> String {

fn from_value(value: &Value) -> String {
if let Value::Data(bytes) = value {
String::from_utf8(bytes.to_owned()).unwrap()
String::from_utf8(bytes.to_owned()).unwrap_or_default()
} else {
"".into()
}
Expand Down
4 changes: 2 additions & 2 deletions test/load/load-test-quadratic-multiplayer.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group">
<intProp name="ThreadGroup.num_threads">100</intProp>
<intProp name="ThreadGroup.num_threads">1000</intProp>
<intProp name="ThreadGroup.ramp_time">1</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Expand Down Expand Up @@ -191,7 +191,7 @@
</eu.luminis.jmeter.wssampler.RequestResponseWebSocketSampler>
<hashTree/>
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<stringProp name="LoopController.loops">1000</stringProp>
<stringProp name="LoopController.loops">5</stringProp>
</LoopController>
<hashTree>
<eu.luminis.jmeter.wssampler.RequestResponseWebSocketSampler guiclass="eu.luminis.jmeter.wssampler.RequestResponseWebSocketSamplerGui" testclass="eu.luminis.jmeter.wssampler.RequestResponseWebSocketSampler" testname="Send Transaction">
Expand Down

0 comments on commit 30252cb

Please sign in to comment.