Skip to content

Commit 2e613eb

Browse files
authored
Merge pull request #6627 from umbraco/uMs
Updated startup.cs to program.cs
2 parents 4762f54 + 5157ed9 commit 2e613eb

File tree

1 file changed

+15
-18
lines changed
  • 13/umbraco-engage/developers/headless

1 file changed

+15
-18
lines changed

13/umbraco-engage/developers/headless/README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,24 @@ To install the Umbraco Engage Headless API, follow these steps:
4242
dotnet add package Umbraco.Engage.Headless
4343
```
4444

45-
## Updating Startup.cs
45+
## Updating Program.cs
4646

47-
To update the Startup.cs file, follow these steps:
47+
To update the Program.cs file, follow these steps:
4848

49-
1. Open your `Startup.cs` file.
50-
2. Locate the **ConfigureServices** method.
51-
3. Add the line `.AddMarketingApiDocumentation()` after `.AddDeliveryApi()`. Your ConfigureServices method should look like this:
49+
1. Open your `Program.cs` file.
50+
2. Add the line `.AddEngageApiDocumentation()` after `.AddDeliveryApi()`. Your `CreateUmbracoBuilder` method should look like this:
5251

5352
```cs
54-
public void ConfigureServices(IServiceCollection services)
55-
{
56-
services.AddUmbraco(_env, _config)
57-
.AddBackOffice()
58-
.AddWebsite()
59-
.AddDeliveryApi()
60-
.AddMarketingApiDocumentation()
61-
.AddComposers()
62-
.Build();
63-
}
53+
builder.CreateUmbracoBuilder()
54+
.AddBackOffice()
55+
.AddWebsite()
56+
.AddDeliveryApi()
57+
.AddEngageApiDocumentation()
58+
.AddComposers()
59+
.Build();
60+
6461
```
6562

66-
4. Rebuild and run your site.
67-
5. Navigate to **/umbraco/swagger** in your browser.
68-
6. From the top right definition dropdown, check for the **Umbraco Engage Marketing API.**
63+
3. Rebuild and run your site.
64+
4. Navigate to **/umbraco/swagger** in your browser.
65+
5. From the top right definition dropdown, check for the **Umbraco Engage Marketing API.**

0 commit comments

Comments
 (0)