Skip to content

Commit

Permalink
Initial codespace branch and associated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danuw committed Dec 11, 2023
1 parent 046e5ec commit 44578f4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
// Use 'appPort' to create a container with published ports. If the port isn't working, be sure
// your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost.
// "appPort": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [5073],
// "portsAttributes": {
// "5073": {
// "protocol": "https"
// }
// },

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "rustc --version",
Expand Down
29 changes: 29 additions & 0 deletions docs/codespaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Launching the SDK in github Codespaces
========

> Note: These instructions do not include anything about
Browse to the folder
```sh
cd src/CarbonAware.WebApi/src/
```

Run the project
```sh
dotnet run
```

It should look like that

![sceenshot of the terminal view starting the webapi in codespaces](./images/codespaces-terminal-1.png)

You can then select the browser icon to open in the browser

![codespaces port tab](./images/codespaces-ports-1.png)

> Note: the URL to browse needs to have that format: https://<codespace public URL>/swagger
Make sure to browser to the swagger UI by appending `/swagger` to the URL, and the following should open.

![sceenshot of the browser view starting the webapi and navigating to the Swagger UI](./images/codespaces-browser-1.png)

Binary file added docs/images/codespaces-browser-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/codespaces-ports-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/codespaces-terminal-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 44578f4

Please sign in to comment.