1 min read
How to generate BFC API from Template
In this section we will explain how to generate an initial version of the BFC API from the Template. We will use our Sfcc powered BFC API for most of the examples.
- Githug access in order to obtain an API Template project. In this specific example we are working against Poq github, otherwise “BFC API Template” will be provided to you and you will need to use your org's github to store the code.
- .NET Core 5.0 SDK and later versions
- Checkout the latest version of the NetCoreWebApiOcapiBackendForClient template (Sfcc BFC template). All templates are located under https://github.com/poqcommerce/Poq.ApiTemplate repo.
- Install the template using a command line. Example:
dotnet new -i "/Users/andrei/Documents/GitHub/Poq/Poq.ApiTemplate/NetCoreWebApiOcapiBackendForClient"
- Execute template. Example:
dotnet new poqapiocapibfctemplate --name Poq.Api.YourBrand -o "/Users/andrei/Documents/GitHub/Poq/Poq.Backend.Yourbrand"
- Once executed, the full BFC API will be created from the template. Template will also add the rest of the required files to the folder such as:
- Launch Poq.Api.YourBrand.sln solution and build it.
- Run unit tests.
Congratulations, you have successfully generated a BFC API from the BFC API Template.
You may have noticed that Integration.Tests have failed. This is expected. You need to apply proper local configuration before they start working as expected. Checkout next steps for further information.