Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/auto-sync-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Auto Merge Core
on:
push:
branches:
- 'core/v7.1'
- 'core/v7.0'

run-name: "Merge ${{ github.ref_name }} into docs"

Expand All @@ -16,7 +16,7 @@ jobs:
name: Merge ${{ github.ref_name }} into ${{ matrix.branch }}
strategy:
matrix:
branch: [unreal/v2.3]
branch: [unity/v5.0, unreal/v2.3]
outputs:
success_branches: ${{ steps.aggregate.outputs.success_branches }}
conflicted_branches: ${{ steps.aggregate.outputs.conflicted_branches }}
Expand Down
32 changes: 16 additions & 16 deletions docs/cli/guides/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ someOtherFolder
| `someOtherFolder` | no config is available |


## Validation
## Validation

From any folder, you can run the [beam config](../commands/cli-command-reference/config/config.md) command to print information about your current Beamable folder.
From any folder, you can run the [beam config](../commands/cli-command-reference/config/config.md) command to print information about your current Beamable folder.

In the example directory structure above, if the `beam config` command was invoked from the `mainFolder`, it would log information about the `mainFolder/.beamable` folder.
In the example directory structure above, if the `beam config` command was invoked from the `mainFolder`, it would log information about the `mainFolder/.beamable` folder.
```sh
mainFolder % dotnet beam config
{
"host": "https://api.beamable.com",
"cid": "<redacted>",
"pid": "<redacted>",
"configPath": "/Users/examples/mainFolder/.beamable"
}
{
"host": "https://api.beamable.com",
"cid": "<redacted>",
"pid": "<redacted>",
"configPath": "/Users/examples/mainFolder/.beamable"
}
```

However, if the `beam config` command was invoked from the `someOtherFolder` path, you should expect to see an error, because there is no `.beamable` folder within the parent linear.
However, if the `beam config` command was invoked from the `someOtherFolder` path, you should expect to see an error, because there is no `.beamable` folder within the parent lineage.

```sh
someOtherFolder % dotnet beam config
Expand All @@ -51,16 +51,16 @@ someOtherFolder % dotnet beam config

NOTE: Consider calling `beam init` first.



Logs at

  /var/folders/ys/949qmfy15r7bl8x36s6wmm000000gn/T/beamCliLog.txt
```

## Dotnet Tool Folder
## .NET Tool Folder

The Beamable CLI executes as a local dotnet tool installation. That means that there should be a `.config/` folder in your project. There should be a file called `dotnet-tools.json` in the folder, declaring the version of the CLI you are using.
The Beamable CLI executes as a local .NET tool installation. That means that there should be a `.config/` folder in your project. There should be a file called `dotnet-tools.json` in the folder, declaring the version of the CLI you are using.

```json
{
Expand All @@ -79,16 +79,16 @@ The Beamable CLI executes as a local dotnet tool installation. That means that t

!!! info "The folder can exist in a higher folder."

Normally the `.config/` folder exists as a sibling of the `.beamable/` folder. However, the `.config/` folder _may_ exist in a parent folder. The closest `.config/` folder will be used. See the [dotnet tool documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/local-tools-how-to-use) for more information.
Normally the `.config/` folder exists as a sibling of the `.beamable/` folder. However, the `.config/` folder _may_ exist in a parent folder. The closest `.config/` folder will be used. See the [.NET tool documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/local-tools-how-to-use) for more information.


## Workspace Overview

A Beamable workspace is defined by the existence of a `.beamable/` folder.
A Beamable workspace is defined by the existence of a `.beamable/` folder.

| Path | Note |
| ---------------- | ----------------- |
| `config.beam.json` | this file must exist, and contains your project's connection information. |
| `config.beam.json` | this file must exist, and contains your project's connection information. |
| `/temp` | this folder should not be included in version control. It contains information about your current session. The contents of this folder may be discarded at any time |
| `/shared` | this folder contains information that will be shared with other developers in the project |
| `/local` | this folder should not be included in version control. It contains local information specific to your session |
22 changes: 11 additions & 11 deletions docs/cli/guides/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Get up and running with the Beamable CLI

The Beamable CLI is a dotnet tool that allows developers to interact with Beamable. It can manage a variety of Beamable technologies, including Microservices, Content, and other services.
The Beamable CLI is a .NET tool that allows developers to interact with Beamable. It can manage a variety of Beamable technologies, including Microservices, Content, and other services.

## Dependencies
You'll need to install [Dotnet 10](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) before you can get started.
You'll need to install [.NET 10](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) before you can get started.
Verify it is installed by running `dotnet --version` from a terminal.

!!! info "We support Dotnet 8 as well."
!!! info "We support .NET 8 as well."

If you are using the Beamable CLI before version 7.0, then you should be using [Dotnet 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0). Starting with CLI 7.0 and beyond, we support both versions of dotnet, but we recommend you use `net10.0`.
If you are using the Beamable CLI before version 7.0, then you should be using [.NET 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0). Starting with CLI 7.0 and beyond, we support both versions of .NET, but we recommend you use `net10.0`.

## Installing

Expand All @@ -32,17 +32,17 @@ The following command will install the latest CLI. The "latest" string can be an
beam version install latest
```

!!! info "Check Versions on Nuget"
!!! info "Check Versions on NuGet"

Remember, Beamable.Tools is a dotnet tool available through Nuget. As such, you can find all available versions at [nuget.org](https://www.nuget.org/packages/Beamable.Tools)
Remember, Beamable.Tools is a .NET tool available through NuGet. You can find all available versions at [nuget.org](https://www.nuget.org/packages/Beamable.Tools)

There may be updates you are required to do, so please check the [migration guide](upgrading.md).

## Getting Started

Now that Beamable is installed, you can connect to an existing Beamable organization. If you haven't setup an organization yet, [create a Beamable organization](https://portal.beamable.com/signup/registration/) first.
Now that Beamable is installed, you can connect to an existing Beamable organization. If you haven't setup an organization yet, [create a Beamable organization](https://portal.beamable.com/signup/registration/) first.

You can connect the CLI to your Beamable organization with the [beam init](../commands/cli-command-reference/init.md) command.
You can connect the CLI to your Beamable organization with the [beam init](../commands/cli-command-reference/init.md) command.

```shell
mkdir MyProject
Expand All @@ -54,11 +54,11 @@ This command will prompt you for your organization's alias, your credentials, an
```shell
dotnet beam config
```
You should expect to see your CID/PID printed out.
You should expect to see your CID/PID printed out.

As of CLI 3.0.0, anytime you create a Beamable workspace, the CLI will be installed as a local tool next to the workspace's `.beamable` folder. This means that you can run the local tool with `dotnet beam`. If you continue to use `beam` in the workspace, the global installation will automatically forward your command to the local tool. This will be inefficient and lead to poor performance. We recommend you use `dotnet beam` wherever possible.
As of CLI 3.0.0, anytime you create a Beamable workspace, the CLI will be installed as a local tool next to the workspace's `.beamable` folder. This means that you can run the local tool with `dotnet beam`. If you continue to use `beam` in the workspace, the global installation will automatically forward your command to the local tool. This will be inefficient and lead to poor performance. We recommend you use `dotnet beam` wherever possible.

To check that everything is working correctly, you can use the beam me command. Now you have a configured CLI project!
To check that everything is working correctly, you can use the beam me command. Now you have a configured CLI project!

!!! info "Finding Help"

Expand Down
34 changes: 17 additions & 17 deletions docs/cli/guides/microservices.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Developing Standalone Microservices with the Beam CLI

Beamable offers a rich microservice development workflow using the Beam CLI and Dotnet. Microservices deploy to the Beamable Cloud, and offer a secure way to handle server-side authoritative logic for your games.
Beamable offers a rich microservice development workflow using the Beam CLI and .NET. Microservices deploy to the Beamable Cloud, and offer a secure way to handle server-side authoritative logic for your games.

## Dependencies

Before you can develop a Beamable Standalone Microservice, you need to complete the [Getting-Started Guide](getting-started.md). That means having [Dotnet 10](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) installed, and getting the [Beam CLI](https://www.nuget.org/packages/Beamable.Tools).
Before you can develop a Beamable Standalone Microservice, you need to complete the [Getting-Started Guide](getting-started.md). That means having [.NET 10](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) installed, and getting the [Beam CLI](https://www.nuget.org/packages/Beamable.Tools).

You can confirm you have everything installed checking the versions of the tools.
```sh
Expand All @@ -24,21 +24,21 @@ dotnet beam init MyProject
cd MyProject
```

Once you have a `.beamable` workspace, you can create a new Standalone Microservice using the [project new](ms-workflow.md#creating-new-projects) command.
Once you have a `.beamable` workspace, you can create a new Standalone Microservice using the [project new](ms-workflow.md#creating-new-projects) command.

```sh
# run this inside your .beamable workspace
dotnet beam project new service HelloWorld
```

A new file, `BeamableServices.sln` has been created in `/MyProject`. Open it in your IDE of choice (Visual Studio Code, Rider, or Visual Studio).
A new file, `BeamableServices.sln` has been created in `/MyProject`. Open it in your IDE of choice (Visual Studio Code, Rider, or Visual Studio).

![Project Structure](https://files.readme.io/751b491-image.png)


Congratulations, you have a local Beamable Standalone Microservice! To run it, you can use the IDE tooling to start the `HelloWorld` project, or you can use the project run command. If you're familiar with `dotnet`, you can also use the normal `dotnet run` command as well.
Congratulations, you have a local Beamable Standalone Microservice! To run it, you can use the IDE tooling to start the `HelloWorld` project, or you can use the project run command. If you're familiar with `dotnet`, you can also use the normal `dotnet run` command as well.

However you decide to run the project, you should see a stream of logs similar to the snippet below,
However you decide to run the project, you should see a stream of logs similar to the snippet below,

```
13:25:33.077 [DBUG] Service provider initialized
Expand All @@ -47,35 +47,35 @@ However you decide to run the project, you should see a stream of logs similar t

```

The service is running! You can send requests to the service over HTTP. To verify, you can open the local Open API documentation by using the project open-swagger command.
The service is running! You can send requests to the service over HTTP. To verify, you can open the local Open API documentation by using the project open-swagger command.

```sh
dotnet beam project open-swagger
```

Your local web browser should open to the Beamable Portal, showing the local Open API documentation,
Your local web browser should open to the Beamable Portal, showing the local Open API documentation,
![local swagger docs](https://files.readme.io/6c000ac-image.png)


Click on the last green button that says, "`POST` /Add", and then select the "Try It Out" button. In the Request Body, enter some sample JSON,
Click on the last green button that says, "`POST` /Add", and then select the "Try It Out" button. In the Request Body, enter some sample JSON,

```json
{
"a": 2,
"b": 3
}
```
And then click the Execute button! In your Standalone Microservice project, you should see some logs appear indicating the service was invoked.
And then click the Execute button! In your Standalone Microservice project, you should see some logs appear indicating the service was invoked.

```
13:30:18.945 [DBUG] Handling Add
```

The `Add` function is defined in the `HelloWorld.cs` file.
The `Add` function is defined in the `HelloWorld.cs` file.

```csharp
using Beamable.Server;

namespace Beamable.HelloWorld
{
[Microservice("HelloWorld")]
Expand All @@ -90,21 +90,21 @@ namespace Beamable.HelloWorld
}
```

You can write new functions and tag them with `[ClientCallable]` to make them accessible on the Open API page. Now you know the basics of working with Beamable Standalone Microservices!
You can write new functions and tag them with `[ClientCallable]` to make them accessible on the Open API page. Now you know the basics of working with Beamable Standalone Microservices!

---
## Project Structure

Each file in the Standalone Microservice has a valuable function that is important to understand.
Each file in the Standalone Microservice has a valuable function that is important to understand.

| file | function |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MyProject/services/.gitignore` | a version control file that will ignore build and intermediate folders from your git based source control |
| `MyProject/services/Dockerfile` | When the Standalone Microservice is deployed, it will be containerized using Docker. You can modify the Dockerfile to extend the capabilities of the service. See the [Deployment Section](ms-deployment.md#Dockerfiles) for more details |
| `MyProject/services/HelloWorld.cs` | This file is the main `.cs` file that has your server functionality |
| `MyProject/services/Programcs` | This file is the entry point of the dotnet application. It bootstraps the server and starts it. You may edit it, but make sure not to remove the section that enables the service. |
| `MyProject/services/HelloWorld.csproj` | This file is the dotnet project file for your service. You can modify the `.csproj` file to customize your service. See the [Microservice Configuration Section](ms-configuration.md) section for more details |
| `MyProject/BeamableServices.sln` | This file is the dotnet solution file, and organizes your services. If you add additional services or storage databases, they will be tracked through the `.sln` file. |
| `MyProject/services/Programcs` | This file is the entry point of the .NET application. It bootstraps the server and starts it. You may edit it, but make sure not to remove the section that enables the service. |
| `MyProject/services/HelloWorld.csproj` | This file is the .NET project file for your service. You can modify the `.csproj` file to customize your service. See the [Microservice Configuration Section](ms-configuration.md) section for more details |
| `MyProject/BeamableServices.sln` | This file is the .NET solution file, and organizes your services. If you add additional services or storage databases, they will be tracked through the `.sln` file. |

---
## Next Steps
Expand Down
Loading