Skip to content

Commit

Permalink
fix: azd up in codespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
manekinekko committed May 19, 2024
1 parent c43b00e commit 5387db7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,23 @@ EMAIL_SENDER_APP_PASSWORD="foobar"

**Important: Please follow [this guide](https://support.microsoft.com/account-billing/manage-app-passwords-for-two-step-verification-d6dc8c6d-4bf7-4851-ad95-6d07799387e9) to generate an Application Password if you are using MFA.**

To run the sample, run the following command which will start the web app and the API locally:
To run the sample, run the following commands, which will start the web app, and the API locally.

1. Open a terminal and navigate to the root of the project, then run the API server first:

```bash
npm install --prefix api
npm start --prefix api
```

2. Open another terminal and navigate to the root of the project, then run the webapp server:

```bash
npm install
npm start
```

Open the URL `http://localhost:4280` in your browser to start chatting with the Assistant.

Note that the documents are uploaded automatically when deploying the sample to Azure with `azd up`.
Open the URL `http://localhost:4280` in your browser to interact with the Assistant.

### Deploy the sample to Azure

Expand Down
3 changes: 2 additions & 1 deletion swa-cli.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"configurations": {
"azure-openai-assistant-javascript": {
"appLocation": "src",
"apiLocation": "api",
"apiLocation": "",
"outputLocation": "dist",
"apiLanguage": "node",
"apiVersion": "18",
"appBuildCommand": "npm run build",
"apiBuildCommand": "npm run build --if-present",
"run": "npm run dev",
"appDevserverUrl": "http://localhost:5173",
"apiDevserverUrl": "http://localhost:7071",
"env": "default",
"appName": "webapp"
}
Expand Down

0 comments on commit 5387db7

Please sign in to comment.