Skip to content

Commit 8412d6d

Browse files
committed
In all tutorials and quickstarts we specify --server local
1 parent 58b06dc commit 8412d6d

7 files changed

Lines changed: 30 additions & 30 deletions

File tree

docs/docs/03-Unity Tutorial/03-part-2.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,15 +422,15 @@ Created new database with name: blackholio, identity: c200d2c69b4524292b91822afa
422422
Next, use the `spacetime` command to call our newly defined `debug` reducer:
423423

424424
```sh
425-
spacetime call blackholio debug
425+
spacetime call --server local blackholio debug
426426
```
427427

428428
</TabItem>
429429
<TabItem value="csharp" label="C#">
430430
Next, use the `spacetime` command to call our newly defined `Debug` reducer:
431431

432432
```sh
433-
spacetime call blackholio Debug
433+
spacetime call --server local blackholio Debug
434434
```
435435

436436
</TabItem>
@@ -439,7 +439,7 @@ spacetime call blackholio Debug
439439
If the call completed successfully, that command will have no output, but we can see the debug logs by running:
440440

441441
```sh
442-
spacetime logs blackholio
442+
spacetime logs --server local blackholio
443443
```
444444

445445
You should see something like the following output:
@@ -472,7 +472,7 @@ The `client_connected` argument to the `spacetimedb::reducer` macro indicates to
472472

473473
> SpacetimeDB gives you the ability to define custom reducers that automatically trigger when certain events occur.
474474
>
475-
> - `init` - Called the first time you publish your module and anytime you clear the database with `spacetime publish <name> --delete-data`.
475+
> - `init` - Called the first time you publish your module and anytime you clear the database with `spacetime publish --server local <name> --delete-data`.
476476
> - `client_connected` - Called when a user connects to the SpacetimeDB database. Their identity can be found in the `sender` value of the `ReducerContext`.
477477
> - `client_disconnected` - Called when a user disconnects from the SpacetimeDB database.
478478
@@ -492,7 +492,7 @@ The `ReducerKind.ClientConnected` argument to the `SpacetimeDB.Reducer` attribut
492492

493493
> SpacetimeDB gives you the ability to define custom reducers that automatically trigger when certain events occur.
494494
>
495-
> - `ReducerKind.Init` - Called the first time you publish your module and anytime you clear the database with `spacetime publish <name> --delete-data`.
495+
> - `ReducerKind.Init` - Called the first time you publish your module and anytime you clear the database with `spacetime publish --server local <name> --delete-data`.
496496
> - `ReducerKind.ClientConnected` - Called when a user connects to the SpacetimeDB database. Their identity can be found in the `Sender` value of the `ReducerContext`.
497497
> - `ReducerKind.ClientDisconnected` - Called when a user disconnects from the SpacetimeDB database.
498498
@@ -690,7 +690,7 @@ Subscription applied indicates that the SpacetimeDB SDK has evaluated your subsc
690690
We can also see that the server has logged the connection as well.
691691

692692
```sh
693-
spacetime logs blackholio
693+
spacetime logs --server local blackholio
694694
...
695695
2025-01-10T03:51:02.078700Z DEBUG: src/lib.rs:63: c200fb5be9524bfb8289c351516a1d9ea800f70a17a9a6937f11c0ed3854087d just connected.
696696
```

docs/docs/03-Unity Tutorial/05-part-4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ Notice that the food automatically respawns as you vaccuum them up. This is beca
604604

605605
## Connecting to Maincloud
606606

607-
- Publish to Maincloud `spacetime publish -s maincloud <your database name> --delete-data`
607+
- Publish to Maincloud `spacetime publish --server maincloud <your database name> --delete-data`
608608
- `<your database name>` This name should be unique and cannot contain any special characters other than internal hyphens (`-`).
609609
- Update the URL in the Unity project to: `https://maincloud.spacetimedb.com`
610610
- Update the module name in the Unity project to `<your database name>`.
@@ -626,7 +626,7 @@ private void Start()
626626
}
627627
```
628628

629-
To delete your Maincloud database, you can run: `spacetime delete -s maincloud <your database name>`
629+
To delete your Maincloud database, you can run: `spacetime delete --server maincloud <your database name>`
630630

631631
# Conclusion
632632

docs/docs/04-Unreal Tutorial/03-part-2.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,15 @@ Created new database with name: blackholio, identity: c200d2c69b4524292b91822afa
409409
<TabItem value="rust" label="Rust">
410410

411411
```sh
412-
spacetime call blackholio debug
412+
spacetime call --server local blackholio debug
413413
```
414414

415415
</TabItem>
416416
<TabItem value="csharp" label="C#">
417417
Next, use the `spacetime` command to call our newly defined `Debug` reducer:
418418

419419
```sh
420-
spacetime call blackholio Debug
420+
spacetime call --server local blackholio Debug
421421
```
422422

423423
</TabItem>
@@ -426,7 +426,7 @@ spacetime call blackholio Debug
426426
If the call completed successfully, that command will have no output, but we can see the debug logs by running:
427427

428428
```sh
429-
spacetime logs blackholio
429+
spacetime logs --server local blackholio
430430
```
431431

432432
You should see something like the following output:
@@ -459,7 +459,7 @@ The `client_connected` argument to the `spacetimedb::reducer` macro indicates to
459459

460460
> SpacetimeDB gives you the ability to define custom reducers that automatically trigger when certain events occur.
461461
>
462-
> - `init` - Called the first time you publish your module and anytime you clear the database with `spacetime publish <name> --delete-data`.
462+
> - `init` - Called the first time you publish your module and anytime you clear the database with `spacetime publish --server local <name> --delete-data`.
463463
> - `client_connected` - Called when a user connects to the SpacetimeDB database. Their identity can be found in the `sender` value of the `ReducerContext`.
464464
> - `client_disconnected` - Called when a user disconnects from the SpacetimeDB database.
465465
@@ -479,7 +479,7 @@ The `ReducerKind.ClientConnected` argument to the `SpacetimeDB.Reducer` attribut
479479

480480
> SpacetimeDB gives you the ability to define custom reducers that automatically trigger when certain events occur.
481481
>
482-
> - `ReducerKind.Init` - Called the first time you publish your module and anytime you clear the database with `spacetime publish <name> --delete-data`.
482+
> - `ReducerKind.Init` - Called the first time you publish your module and anytime you clear the database with `spacetime publish --server local <name> --delete-data`.
483483
> - `ReducerKind.ClientConnected` - Called when a user connects to the SpacetimeDB database. Their identity can be found in the `Sender` value of the `ReducerContext`.
484484
> - `ReducerKind.ClientDisconnected` - Called when a user disconnects from the SpacetimeDB database.
485485
@@ -753,7 +753,7 @@ Subscription applied indicates that the SpacetimeDB SDK has evaluated your subsc
753753
We can also see that the server has logged the connection as well.
754754
755755
```sh
756-
spacetime logs blackholio
756+
spacetime logs --server local blackholio
757757
...
758758
2025-01-10T03:51:02.078700Z DEBUG: src/lib.rs:63: c200fb5be9524bfb8289c351516a1d9ea800f70a17a9a6937f11c0ed3854087d just connected.
759759
```

docs/docs/04-Unreal Tutorial/05-part-4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,15 +644,15 @@ Notice that the food automatically respawns as you vaccuum them up. This is beca
644644

645645
## Connecting to Maincloud
646646

647-
- Publish to Maincloud `spacetime publish -s maincloud <your database name> --delete-data`
647+
- Publish to Maincloud `spacetime publish --server maincloud <your database name> --delete-data`
648648
- `<your database name>` This name should be unique and cannot contain any special characters other than internal hyphens (`-`).
649649
- Update the URL in the Unreal project to: `https://maincloud.spacetimedb.com`
650650
- Update the module name in the Unreal project to `<your database name>`.
651651
- Your `BP_GameManager` should look something like this:
652652

653653
![Maincloud Setup](/images/unreal/part-4-01-maincloud.png)
654654

655-
To delete your Maincloud database, you can run: `spacetime delete -s maincloud <your database name>`
655+
To delete your Maincloud database, you can run: `spacetime delete --server maincloud <your database name>`
656656

657657
## Conclusion
658658

docs/docs/06-Server Module Languages/02-rust-quickstart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,21 +245,21 @@ And that's all of our module code! We'll run `spacetime publish` to compile our
245245
From the `quickstart-chat` directory, run in another tab:
246246

247247
```bash
248-
spacetime publish --project-path spacetimedb quickstart-chat
248+
spacetime publish --server local --project-path spacetimedb quickstart-chat
249249
```
250250

251251
## Call Reducers
252252

253253
You can use the CLI (command line interface) to run reducers. The arguments to the reducer are passed in JSON format.
254254

255255
```bash
256-
spacetime call quickstart-chat send_message "Hello, World!"
256+
spacetime call --server local quickstart-chat send_message "Hello, World!"
257257
```
258258

259259
Once we've called our `send_message` reducer, we can check to make sure it ran by running the `logs` command.
260260

261261
```bash
262-
spacetime logs quickstart-chat
262+
spacetime logs --server local quickstart-chat
263263
```
264264

265265
You should now see the output that your module printed in the database.
@@ -276,7 +276,7 @@ You should now see the output that your module printed in the database.
276276
SpacetimeDB supports a subset of the SQL syntax so that you can easily query the data of your database. We can run a query using the `sql` command.
277277

278278
```bash
279-
spacetime sql quickstart-chat "SELECT * FROM message"
279+
spacetime sql --server local quickstart-chat "SELECT * FROM message"
280280
```
281281

282282
```bash

docs/docs/06-Server Module Languages/04-csharp-quickstart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ And that's all of our module code! We'll run `spacetime publish` to compile our
265265
From the `quickstart-chat` directory, run:
266266

267267
```bash
268-
spacetime publish --project-path spacetimedb quickstart-chat
268+
spacetime publish --server local --project-path spacetimedb quickstart-chat
269269
```
270270

271271
Note: If the WebAssembly optimizer `wasm-opt` is installed, `spacetime publish` will automatically optimize the Web Assembly output of the published module. Instruction for installing the `wasm-opt` binary can be found in [Rust's wasm-opt documentation](https://docs.rs/wasm-opt/latest/wasm_opt/).
@@ -275,13 +275,13 @@ Note: If the WebAssembly optimizer `wasm-opt` is installed, `spacetime publish`
275275
You can use the CLI (command line interface) to run reducers. The arguments to the reducer are passed in JSON format.
276276

277277
```bash
278-
spacetime call quickstart-chat SendMessage "Hello, World!"
278+
spacetime call --server local quickstart-chat SendMessage "Hello, World!"
279279
```
280280

281281
Once we've called our `SendMessage` reducer, we can check to make sure it ran by running the `logs` command.
282282

283283
```bash
284-
spacetime logs quickstart-chat
284+
spacetime logs --server local quickstart-chat
285285
```
286286

287287
You should now see the output that your module printed in the database.
@@ -295,7 +295,7 @@ info: Hello, World!
295295
SpacetimeDB supports a subset of the SQL syntax so that you can easily query the data of your database. We can run a query using the `sql` command.
296296

297297
```bash
298-
spacetime sql quickstart-chat "SELECT * FROM message"
298+
spacetime sql --server local quickstart-chat "SELECT * FROM message"
299299
```
300300

301301
```bash

docs/docs/06-Server Module Languages/05-typescript-quickstart.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ Inside the `spacetimedb/` directory will be a `src/index.ts` entrypoint (require
3838
## How to Build & Publish
3939

4040
> [!IMPORTANT]
41-
> TypeScript modules are built and published with the `spacetime` CLI. `spacetime publish` will transpile and bundle your server module for you starting with the `src/index.ts` entrypoint. If you bundle your js yourself, you can specify `spacetime publish --js-path <path-to-your-bundle-file>` when publishing.
41+
> TypeScript modules are built and published with the `spacetime` CLI. `spacetime publish` will transpile and bundle your server module for you starting with the `src/index.ts` entrypoint. If you bundle your js yourself, you can specify `spacetime publish --server local --js-path <path-to-your-bundle-file>` when publishing.
4242
4343
From the `spacetimedb/` directory you can lint/typecheck locally if you like, but to make the module live you’ll publish it to a database:
4444

4545
```bash
4646
cd spacetimedb
47-
spacetime publish --project-path spacetimedb quickstart-chat
47+
spacetime publish --server local --project-path spacetimedb quickstart-chat
4848
```
4949

5050
Publishing bundles your TypeScript into a single artifact and installs it into the `quickstart-chat` database.
@@ -203,7 +203,7 @@ spacetime start
203203
From the `quickstart-chat` directory (the parent of `spacetimedb/`):
204204

205205
```bash
206-
spacetime publish --project-path spacetimedb quickstart-chat
206+
spacetime publish --server local --project-path spacetimedb quickstart-chat
207207
```
208208

209209
You can choose any unique, URL-safe database name in place of `quickstart-chat`. The CLI will show the database **Identity** (a hex string) as well; you can use either the name or identity with CLI commands.
@@ -215,13 +215,13 @@ Use the CLI to call reducers. Arguments are passed as JSON (strings may be given
215215
Send a message:
216216

217217
```bash
218-
spacetime call quickstart-chat send_message "Hello, World!"
218+
spacetime call --server local quickstart-chat send_message "Hello, World!"
219219
```
220220

221221
Check that it ran by viewing logs (owner-only):
222222

223223
```bash
224-
spacetime logs quickstart-chat
224+
spacetime logs --server local quickstart-chat
225225
```
226226

227227
You should see output similar to:
@@ -238,7 +238,7 @@ You should see output similar to:
238238
SpacetimeDB supports a subset of SQL so you can query your data:
239239

240240
```bash
241-
spacetime sql quickstart-chat "SELECT * FROM message"
241+
spacetime sql --server local quickstart-chat "SELECT * FROM message"
242242
```
243243

244244
Output will resemble:

0 commit comments

Comments
 (0)