Skip to content

Commit

Permalink
update guide to add forward port
Browse files Browse the repository at this point in the history
Signed-off-by: Bwise1 <[email protected]>
  • Loading branch information
Bwise1 committed Dec 7, 2024
1 parent 7e74393 commit cbb1713
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion guides/20240910_guide_srcbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Now, open the `devcontainer.json` file and add the following configuration:
- **Note:**
- _Post Commands_: Automatically install necessary packages and start Srcbook after the container is created.
- _Forward Ports_: Ensures Srcbook runs on `localhost:2150` as specified in the devcontainer.json file.
![Port Forwarding](../guides/assets/20241207_forwarding_srcbook_port_to_localhost_img.png)

### Step 2.3: Launching the Devcontainer and Daytona

Expand All @@ -91,6 +92,16 @@ Now, open the `devcontainer.json` file and add the following configuration:

With Daytona running and the environment set up, you can now create a repository with a devcontainer for Srcbook:

### Step 2.5: Adding API Tools API Key

To configure your development environment with the required API key, follow these steps:

1. Go to the API tools dashboard.
2. Navigate to the "API Keys" section.
3. Click "Generate New Key" and copy the key.

![Adding API Key](../guides/assets/20241207_setting_up_ai_tools_adding_api_keys_for_integration_img.png)

#### Example

```bash
Expand Down Expand Up @@ -137,6 +148,12 @@ const greet = (name: string) => `Hello, ${name}!`;
console.log(greet("Srcbook"));
```

### Sample TypeScript Srcbook Screenshot

Below is an example of a TypeScript notebook in Srcbook. The screenshot demonstrates a simple `greet` function:

![Srcbook Example](../guides/assets/20241207_sample_typescript_src_book_img.png)

## Step 5: Tips for Effective Use

### 5.1 Environment Management
Expand Down Expand Up @@ -191,4 +208,4 @@ Explore more advanced Srcbook features by visiting the [Srcbook Documentation](h
- [Daytona Documentation](https://www.daytona.io/docs)
- [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/)

---
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 cbb1713

Please sign in to comment.