Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.57 KB

SETUP_COMPANION.md

File metadata and controls

30 lines (22 loc) · 1.57 KB

Install RapidCMS Api companion

Web Api

  1. Create a new ASP.NET Core Api project.
  2. Install NuGet-package: RapidCMS.Api.WebApi.
  3. Remove all code from ConfigureServices in Startup.cs and add the following block of code:
services.AddRapidCMSWebApi(config => { config.AllowAnonymousUser(); });
services.AddRapidCMSControllers();
  1. Hit F5: you're now running a completely empty RapidCMS companion Api instance.
  2. Start building your CMS Api by expanding config => {}. Explore the example API to get a sense on how to build such Api and get it working with your RapidCMS WebAssembly instance.

Function Api (.NET 5.0 isolated function -- still in preview)

  1. Create a new .NET 5.0 Azure Functions project (dotnet-isolated -- see this repo).
  2. Install NuGet-package: RapidCMS.Api.Functions (preview).
  3. Add the following block of code to ConfigureServices in Program.cs:
services.AddRapidCMSFunctions(config => { config.AllowAnonymousUser(); });
  1. Run func host start from the Azure Function project root: you're now running a completely empty, serverless RapidCMS companion Api instance.
  2. Start building your CMS Api by expanding config => {}. Explore the example Function API to get a sense on how to build such Api and get it working with your RapidCMS WebAssembly instance.