lithdew / flatend Goto Github PK
View Code? Open in Web Editor NEWQuickly build microservices using p2p networking in NodeJS/Go.
License: MIT License
Quickly build microservices using p2p networking in NodeJS/Go.
License: MIT License
Suggest to add 404 handler to be configuable under config.toml
as follows
[[http.routes]]
code = "404"
service = "notFound"
In Node SDK:
const notFound = async ctx => {
const fs = require("fs");
fs.createFileStream("404.html").pipe(ctx);
}
When trying to use the nodejs example with node version 12.18.1:
/flattend/hello/node_modules/flatend/dist/flatend.js:60
return this.id?.addr ?? "<anon>";
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/pi/flattend/hello/node_modules/flatend/dist/index.js:4:17)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
I think there's an opportunity to share states/data between nodes by using the existing Kademlia table.
With provider.Push()
I am able to broadcast messages to clients. But how I read the responses?
This framework looks very promising with a very nice interface.
I am curious if I can use it for chat like application.
Hello,
I am new to Flatend but think that it has great potential for my needs although I am a bit confused on some features that are listed:
"Fully agnostic and compatible with any type of language, database, tool, library, or framework."
I am also interested to know how well it scales and if nodes can relay messages/packet to other nodes on their way to the destination.
Thanks in advance
I see that reconnect is hardcoded to 8
Can it be configurable, for example, into forever?
I am currently following along the chat example and I don't quite understand 1 thing.
Is publicAddr node a single point of failure? Does publicAddr act like an elected master?
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.