> For the complete documentation index, see [llms.txt](https://docs.sacruda.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sacruda.nl/developers/getting-started/developing-your-app.md).

# Developing your app

With your project now being ready for you, let's actually start writing some code. Go ahead and open the project in your IDE (for Visual Studio Code, you can simply enter `code minesweeper` ). Now open an integrated terminal, and enter this command to start the development environment:

{% code title="Host Terminal" %}

```
npx v7cli dev
```

{% endcode %}

By default, this will start the ArcDev server on `localhost:3128` . This port can be configured in the project configuration. For more information, head to [Configuration](https://docs.sacruda.nl/developers/your-apps-code/project-configuration.md). You'll find *all* configuration options there.

### Connecting to your project

Now that the development server is running, go ahead and boot ArcOS. Yes, that's right, we'll use Sacruda itself as the client-side of our development environment. Neat, huh? Start Sacruda, open the Sacruda Terminal, and enter this command:

{% code title="ArcTerm" %}

```
devenv connect
```

{% endcode %}

{% hint style="warning" %}
By default, this will use port `3128` , just like the ArcDev server. You can optionally enter a port at the end to connect to specifically that port; for example: `devenv connect 4444` .
{% endhint %}

To disconnect, use the built-in `disconnect` command, which is a part of `devenv`:

{% code title="ArcTerm" %}

```
devenv disconnect
```

{% endcode %}

#### Connection issues?

It happens. If you got an error from `devenv`, here's what they mean and potential remedies:

| Error               | Cause                                                                                                  | Solution                                                                                                |
| ------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |
| `ping_failed`       | Sacruda tried to get the project metadata from your ArcDev server, but got no response                 | Check the port. Make sure they're the same on both sides.                                               |
| `port_mismatch`     | Sacruda connected to the server, but the port reported by its config is different from the actual port | This happens if you try to host a development environment on a virtual host. Just... Don't do that.     |
| `build_mismatch`    | The Sacruda build that the project has the definitions for isn't the same as Sacruda itself            | Run `npx v7cli update` to update your project's type definitions.                                       |
| `already_connected` | The `DevEnvironment` service is already connected to another host                                      | Run `devenv disconnect` before trying to connect to another development server.                         |
| `websock_failed`    | Sacruda managed to communicate with the server, but the websocket failed to connect                    | Try restarting both Sacruda and the development server.                                                 |
| `drivemnt_failed`   | The development drive could not be mounted to `V:`                                                     | Make sure the `V:` drive letter is unused. The development environment **has** to mount to this letter. |

### Next steps

You've created a project, started its development server and successfully connected to that server from Sacruda. Great! Now you're ready to cross the void of infinite possibility. Check out the how-to guides on the sidebar to find out how you can use the Sacruda systems to your advantage.&#x20;

Do you want to [create a tray icon](https://docs.sacruda.nl/developers/sacruda-apis/tray-icons.md), [write some files](https://docs.sacruda.nl/developers/sacruda-apis/the-filesystem.md), create a more advanced [process](https://docs.sacruda.nl/developers/sacruda-apis/process-handler.md) manager or listen for [keyboard shortcuts](https://docs.sacruda.nl/developers/sacruda-apis/keyboard-shortcuts.md)? It's all in this Wiki, with way more to come in the future.
