Skip to content

Commit c7d4563

Browse files
committed
Initial codespace branch and associated docs
1 parent c416c92 commit c7d4563

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
// Use 'appPort' to create a container with published ports. If the port isn't working, be sure
1414
// your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost.
1515
// "appPort": [],
16+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
17+
"forwardPorts": [5073],
18+
// "portsAttributes": {
19+
// "5073": {
20+
// "protocol": "https"
21+
// }
22+
// },
1623

1724
// Uncomment the next line to run commands after the container is created.
1825
// "postCreateCommand": "rustc --version",

docs/codespaces.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Launching the SDK in github Codespaces
2+
========
3+
4+
> Note: These instructions do not include anything about
5+
6+
Browse to the folder
7+
```sh
8+
cd src/CarbonAware.WebApi/src/
9+
```
10+
11+
Run the project
12+
```sh
13+
dotnet run
14+
```
15+
16+
It should look like that
17+
18+
![sceenshot of the terminal view starting the webapi in codespaces](./images/codespaces-terminal-1.png)
19+
20+
You can then select the browser icon to open in the browser
21+
22+
![codespaces port tab](./images/codespaces-ports-1.png)
23+
24+
> Note: the URL to browse needs to have that format: https://<codespace public URL>/swagger
25+
26+
Make sure to browser to the swagger UI by appending `/swagger` to the URL, and the following should open.
27+
28+
![sceenshot of the browser view starting the webapi and navigating to the Swagger UI](./images/codespaces-browser-1.png)
29+

docs/images/codespaces-browser-1.png

235 KB
Loading

docs/images/codespaces-ports-1.png

35.5 KB
Loading

docs/images/codespaces-terminal-1.png

45.9 KB
Loading

0 commit comments

Comments
 (0)