Create and develop new Nomirun module

1. Create new Nomirun module

Now you can create your first module. You can type nomirun module new -h to get the help with the command.

An example:

 nomirun module new --module-name ToDoService --net-version net9.0 --type WebApi --output d:\Nomirun

This will generate the new module with initial template. The module is a .NET library.

When the module is generated, it will automatically open a solution in Visual Studio, Visual Studio Code or Jetbrains Rider.

2. Develop and debug Nomirun module

Once you create a module, Nomirun can automatically open your favourite IDE or editor. That depends on the assigned application that can open *.sln file.

2.1. Develop module in Jetbrains Rider 2024+

When the module is open in Jetbrains Rider, you will see the Readme.md file.

Module start

Next, you build the code by clicking on the build icon in the toolbar:

Build module

Once built, you can run the debugger in the toolbar:

Debug module

Once the host application is running, then you can navigate to the server. In case below it’s http://localhost:5310.

Host name

Please note that the port is automatically assigned.

Then you can navigate to http://localhost:5310/swagger. The Default username and password for Swagger are: user/ pass and those can be configured in the Nomirun Host settings.

Swagger UI

Now you can execute some requests with Swagger.

2.2. Develop module in Visual Studio 2022+

When the module is open in Visual Studio 2022+, you will see the main screen.

Visual Studio 2022 Open

Next, you build the code by clicking on the build icon in the toolbar:

Visual Studio 2022 Build

Once built, you can run the debugger in the toolbar:

Visual Studio 2022 Debug

Once the host application is running, then you can navigate to the server. In case below it’s http://localhost:5310.

Host name

Please note that the port is automatically assigned.

Then you can navigate to http://localhost:5310/swagger. The Default username and password for Swagger are: user/ pass and those can be configured in the Nomirun Host settings.

Swagger UI

Now you can execute some requests with Swagger.

2.3. Develop module in Visual Studio Code

For Visual Studio Code you need to install C# Dev Kit as Visual Studio Code is a multi-language development tool. If you already use Visual Studio Code for C# .NET development, then you probably do not have to do anything.

To open a solution in Visual Studio Code, you need to open the folder where your module is located. This is the main screen:

Visual Studio Code Open

Next, you build the code by clicking on the build icon in the toolbar:

Visual Studio Code Build

Once built, you can run the debugger in the toolbar:

Visual Studio Code Debug

Once the host application is running, then you can navigate to the server. In case below it’s http://localhost:5310.

Host name

Please note that the port is automatically assigned.

Then you can navigate to http://localhost:5310/swagger. The Default username and password for Swagger are: user/ pass and those can be configured in the Nomirun Host settings.

Swagger UI