Thanks to visit codestin.com
Credit goes to github.com

Skip to content

okusnadi/NETCoreBlockly

 
 

Repository files navigation

NETCore2Blockly

All Contributors

Build Status GitHub license NuGet Generate Thanks Outdated Licenses

What it does

NETCore2Blockly generates Blockly blocks for each of your controller actions.

Demo at https://netcoreblockly.herokuapp.com/blockly.html ( play with the links from the bottom)

Demo Video at https://www.youtube.com/watch?v=GptkNWjmCzk

How to install NETCore2Blockly in a .NET Core 3.1 WebAPI / MVC application

Step 1:

Install https://www.nuget.org/packages/NetCore2Blockly/ by running the following command in the Package Manager Console:

Install-Package NetCore2Blockly

Step 2:

Modify Startup.cs by adding

public void ConfigureServices(IServiceCollection services)
        {
            //last line
            services.AddBlockly();
        }
public void Configure(IApplicationBuilder app, IWebHostEnvironment env){
        //if you plan to use as html, do not forget app.UseStaticFiles
        //last line
        app.UseBlockly(); 
}

Step 3:

Recommended:

To see the UI , please add

public void Configure(IApplicationBuilder app, IWebHostEnvironment env){
       
       app.UseBlocklyUI(); // you can customize (with BlocklyUIOptions argument )header name, start blocks, others... 
       //you can add  storage like local storage or sqlite 
       //app.UseBlocklyLocalStorage();
       //app.UseBlocklySqliteStorage() ; // other nuget package
       //you can add swaggers also
      //app.UseBlocklySwagger("petstore", "https://petstore.swagger.io/v2/swagger.json")
      //or you can add odata
      //app.UseBlocklyOData("TriPin", "https://services.odata.org/TripPinRESTierService/");
       app.UseBlockly();
}

Step 4:

Run the application and browse to /blockly.html

That's all!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Cosmin Popescu

💻

Adrian Nasui

📖

Tudor Iliescu

💻

robertszabobv

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

.NET Core API to Blockly - generate from WebAPI, Swagger, OData

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 58.1%
  • C# 32.0%
  • HTML 9.1%
  • Other 0.8%