An API based JSON storage implementation with dotnet core and Docker (ref. https://jsonbase.com).
Visit https://github.com/izaxon?tab=packages.
set ROOT_PATH=.
dotnet run
-
Run jsonbase (either from the source code or the docker image).
-
Interact with the API using HTTP GET and PUT requests (see test.http).
curl -X PUT 'http://localhost:5000/demo_bucket/hello' \
-H 'content-type: application/json' \
-d '{"hello": "world"}'
{"hello":"world"}
curl 'http://localhost:5000/demo_bucket/hello'
{"hello":"world"}
See files skaffold.yaml and files in kubernetes
<html>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/3.1.7/signalr.min.js"></script>
<script>
const connection = new signalR.HubConnectionBuilder()
.withUrl("https://localhost:5001/apihub?path=/demo_bucket/hello")
.configureLogging(signalR.LogLevel.Debug)
.build();
async function start() {
try {
await connection.start();
console.log("SignalR Connected.");
} catch (err) {
console.log(err);
setTimeout(start, 5000);
}
};
connection.onclose(start);
// Start the connection.
start();
connection.on("SendUpdated", (path) => {
const li = document.createElement("li");
li.textContent = `${path}`;
document.getElementById("messageList").appendChild(li);
});
</script>
<div id="messageList"></div>
</body>
Hello!
</html>
-
See if https://medium.com/@alm.ozdmr/deployment-of-signalr-with-nginx-daf392cf2b93 can solve SignalR WebSocket problem behind NGINX.
-
Also, see aspnet/SignalR#2829.