NETCore2Blockly generates Blockly blocks for each of your controller actions.
Demo at https://netcoreblockly.herokuapp.com/ ( play with the links from the bottom)
Demo Video at https://www.youtube.com/watch?v=GptkNWjmCzk
Sample Project is TestBlocklyHtml from this repository
Install https://www.nuget.org/packages/NetCore2Blockly/ by running the following command in the Package Manager Console:
Install-Package NetCore2Blockly
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();
}
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
app.UseBlockly();
}
app.UseBlocklySwagger("petstore", "https://petstore.swagger.io/v2/swagger.json")
app.UseBlocklyOData("OdataV4", "https://services.odata.org/TripPinRESTierService/");
app.UseBlocklyGraphQL("localGraphql", "/graphql");
See links 22 for JWT and 31 for Auth0 from https://netcoreblockly.herokuapp.com/
Also, it works with AD enabled - see Authentication group.
Run the application and browse to /blockly.html
That's all!
Download the source code, run the TestBlocklyHtml project ( in the test folder ).
See there
region blockly needed
and
region blockly optional
and follow the code.
All other code is just boilerplate for Swagger, OData,GraphQL that are mandataory for demo'ing the application, not for Blockly2NetCore itself.
Thanks goes to these wonderful people (emoji key):
If you want to contribute, that is plenty of work to be done -see issues tab .
Cosmin Popescu 💻 |
Adrian Nasui 📖 |
Tudor Iliescu 💻 |
robertszabobv 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!