Kuno is a flexible framework for microservices that bridges core concepts with open-source components. This quick start will give you a better understanding of what is possible. At the end, you will have a good starting point for basic APIs. The sections that follow will continue to build upon this quick start.
|Read: 2 minutes||Code: 5 minutes|
Create a Project
Create a new .NET Core console application named HelloWorldService in Visual Studio 2017.
Update the framework to use .NET 4.6.1 by right-clicking on the project in Solution Explorer and then clicking on “Edit HelloWorldService.csproj”.
The resulting project file should look like the following:
Install the Kuno.AspNetCore NuGet package. You can do this by running the following command in the Package Manager Console.
Running this command will also install dependencies including the core Kuno NuGet package.
Create a Request, Function and Host
Create a class named HelloWorldRequest.
Create a function named HelloWorld.
The last snippet does require you to resolve dependencies. Either use your favorite tool to automatically add them or add the following imports.
Initialize a new Stack and call RunWebHost.
Run the Application
Now that you’ve added the most basic components, you can start the application in debug more or skip debug mode. It should start up the console and run the Kestrel host.
In a web browser, navigate to http://localhost:5000/swagger.
- Expand the Hello World endpoint, click “Try it out”, and then “Execute”.
- After making some calls to your endpoint, try out the Get Requests and Get Responses endpoints.
- Check the console to see the output.
Now you’ve got the basics you can continue on to next steps. There you will update your API definition and endpoints with additional information.