Skip to content

Commit a803a31

Browse files
committed
update placeholder format
1 parent 5ead0f3 commit a803a31

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

aspnetcore/tutorials/first-mongo-app.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: This tutorial demonstrates how to create an ASP.NET Core web API us
66
monikerRange: '>= aspnetcore-3.1'
77
ms.author: wpickett
88
ms.custom: mvc, sfi-ropc-nochange
9-
ms.date: 05/04/2026
9+
ms.date: 05/06/2026
1010
uid: tutorials/first-mongo-app
1111
---
1212
# Create a web API with ASP.NET Core and MongoDB
@@ -50,17 +50,17 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine
5050

5151
1. Download and Install MongoDB Shell:
5252
* macOS/Linux: Choose a directory to extract the MongoDB Shell to. Add the resulting path for `mongosh` to the `PATH` environment variable.
53-
* Windows: MongoDB Shell (mongosh.exe) is installed at *C:\\Users\\\<user>\\AppData\\Local\\Programs\\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable.
53+
* Windows: MongoDB Shell (mongosh.exe) is installed at *C:\\Users\\{USER NAME}\\AppData\\Local\\Programs\\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable.
5454
1. Download and Install MongoDB:
5555
* macOS/Linux: Verify the directory that MongoDB was installed at, usually in */usr/local/mongodb*. Add the resulting path for `mongodb` to the `PATH` environment variable.
56-
* Windows: MongoDB is installed at *C:\\Program Files\\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\<version_number>\\bin* to the `PATH` environment variable.
56+
* Windows: MongoDB is installed at *C:\\Program Files\\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\{VERSION NUMBER}\\bin* to the `PATH` environment variable.
5757
1. Choose a Data Storage Directory: Select a directory on your development machine for storing data. Create the directory if it doesn't exist. The MongoDB Shell doesn't create new directories:
5858
* macOS/Linux: For example, `/usr/local/var/mongodb`.
5959
* Windows: For example, `C:\\BooksData`.
60-
1. In the OS command shell (not the MongoDB Shell), use the following command to connect to MongoDB on default port 27017. Replace `<data_directory_path>` with the directory chosen in the previous step.
60+
1. In the OS command shell (not the MongoDB Shell), use the following command to connect to MongoDB on default port 27017. Replace `{DATA DIRECTORY PATH}` with the directory chosen in the previous step.
6161

6262
```console
63-
mongod --dbpath <data_directory_path>
63+
mongod --dbpath {DATA DIRECTORY PATH}
6464
```
6565

6666
Use the previously installed MongoDB Shell in the following steps to create a database, make collections, and store documents. For more information on MongoDB Shell commands, see [`mongosh`](https://docs.mongodb.com/mongodb-shell/run-commands/).
@@ -304,7 +304,7 @@ This tutorial uses [Endpoints Explorer and .http files](xref:test/http-files#use
304304
If this is the first time that a request is generated, the file is created in the project root.
305305

306306
```
307-
@BookStoreApi_HostAddress = https://localhost:<port>
307+
@BookStoreApi_HostAddress = https://localhost:{PORT}
308308
309309
GET {{BookStoreApi_HostAddress}}/books
310310
@@ -450,13 +450,13 @@ In `Program.cs`, add the following highlighted code:
450450
The previous code enables the Swagger middleware for serving the generated JSON document using the Swagger UI. Swagger is only enabled in a development environment. Enabling Swagger in a production environment could expose potentially sensitive details about the API's structure and implementation.
451451

452452
The app uses the OpenAPI document generated by OpenApi, located at `/openapi/v1.json`, to generate the UI.
453-
View the generated OpenAPI specification for the `BookStoreApi` API while the project is running by navigating to `https://localhost:<port>/openapi/v1.json` in your browser.
453+
View the generated OpenAPI specification for the `BookStoreApi` API while the project is running by navigating to `https://localhost:{PORT}/openapi/v1.json` in your browser.
454454

455455
The OpenAPI specification is a document in JSON format that describes the structure and capabilities of your API, including endpoints, request/response formats, parameters, and more. It's essentially a blueprint of your API that can be used by various tools to understand and interact with your API.
456456

457457
1. Build and run the app.
458458

459-
1. Navigate to `https://localhost:<port>/swagger` in your browser. Swagger provides a UI to test all the API endpoints based on the OpenAPI document.
459+
1. Navigate to `https://localhost:{PORT}/swagger` in your browser. Swagger provides a UI to test all the API endpoints based on the OpenAPI document.
460460

461461
1. Expand the **GET /books** endpoint and click the **Try it out** button.
462462

0 commit comments

Comments
 (0)