Friday, April 24, 2020

Swagger/Swashbuckle Kata

scratch
dotnet new webapi
dotnet add package swashbuckle.aspnetcore

Add code:
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();
            services.AddSwaggerGen(options => {
                options.SwaggerDoc("v1"new Microsoft.OpenApi.Models.OpenApiInfo());
            });
        }

Add more code:
            app.UseSwagger();
            app.UseSwaggerUI(options => {
                options.SwaggerEndpoint("v1/swagger.json""My API V1"); 
            });

Run it,
go here:
https://localhost:5001/swagger/index.html

Tuesday, April 21, 2020

browser-sync kata


mkdir one
cd one
new-fromtemplate html
npm install -g browser-sync
browser-sync start --server --files "*.html"

https://browsersync.io/

Terminalizer

 




https://github.com/faressoft/terminalizer


npm install -g terminalizer
terminalizer record demo
terminalizer render demo
 
 
The original gif was nearly 3 meg.  
 
 https://gifcompressor.com/
 
That took it down to 440K. Much better.