cristianoliveira / distributex Goto Github PK
View Code? Open in Web Editor NEWA POC of a federated architecture using HTMX & NGINX - micro-frontends/services (same thing)
License: MIT License
A POC of a federated architecture using HTMX & NGINX - micro-frontends/services (same thing)
License: MIT License
Currently errors are only logged into stdout. Let's implement a close to real example of error handling for the POC
This would probably be better as a PR than as an issue. Unfortunately, I do not have the repo permissions to push a branch and open a PR.
The URLs for the chat
and todo
service in the Running
section of the README return 404s because the routes are not implemented:
You also should be able to access the microservices at:
- Todo list manager - http://localhost:4001/
- Chat service - http://localhost:4002/
- Tech News reader - http://localhost:4003/
This can be resolved in chat
by redirecting /
to /chat
:
use axum::{
response::Redirect, // this is new
routing::{get, post},
Router,
};
...
let app = Router::new()
.route("/", get(|| async { Redirect::permanent("/chat") })) // this is new
.route("/chat", get(crate::http_handlers::index_page))
...
This can be resolved in todo
by redirecting /
to /todos
:
...
router := mux.NewRouter().StrictSlash(true)
router.HandleFunc("/", Redirect()).Methods("GET") // this is new
router.HandleFunc("/todos", IndexHandler(repo)).Methods("GET")
...
func Redirect() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/todos", http.StatusSeeOther)
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.