I'm working in a side project and now I'm getting to the point where I need some sort of interface that doesn't includes 'curl' and 'jq'.<p>I do have some experience with Angular 2+ but I think it is too much for what I need right now. Besides that I'll probably end up trowing away this first version anyways.<p>Right now all I need is some way to fetch data from an API and display these items to the user interact with.<p>Given that what do you think is the easiest way to create a web interface for a simple API?
The API is written in Golang.
One step up from 'curl' and 'jq' is to only target modern browsers supporting Javascript ES6.<p>Just create a static HTML file and a script loaded as an ES6 module.<p>Use the Fetch API for obtaining data from your API. Obtain DOM elements using 'document.querySelector()'. Update the DOM using Javascript template literals (strings) and the 'Element.innerHTML' attribute.<p>For forms, just do a server side redirect after POST or respond with HTTP 201 or 204. Alternatively, add a Javascript submit event listener to the form and do the HTTP POST using a 'FormData' object and the Fetch API.<p>For authorization, either a catch all HTTP Basic Auth in the web server or a HTML login form to your API responding with a session cookie and a redirect.
I've been a fan of Blazor coming from the dotnet/C# world.<p><a href="https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor" rel="nofollow">https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor</a><p><a href="https://docs.microsoft.com/en-us/aspnet/core/blazor/?WT.mc_id=dotnet-35129-website&view=aspnetcore-6.0#blazor-webassembly" rel="nofollow">https://docs.microsoft.com/en-us/aspnet/core/blazor/?WT.mc_i...</a>
I am working on a platform that might suit the problem you described<p><a href="http://widgetterminal.com" rel="nofollow">http://widgetterminal.com</a><p>Feel free to reach out directly to me if you want early access / demo (contact info in profile)