Coder Social home page Coder Social logo

cristianoliveira / distributex Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 3.0 5.98 MB

A POC of a federated architecture using HTMX & NGINX - micro-frontends/services (same thing)

License: MIT License

Dockerfile 2.16% HTML 44.12% Makefile 3.16% Go 21.09% Rust 18.02% Python 11.45%
distributed-systems golang htmx microfrontend microservice nginx python rust server-side-rendering spa

distributex's Introduction

My website

distributex's People

Contributors

cristianoliveira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

distributex's Issues

URLs in README.md return 404

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)
	}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.