maiah / synth Goto Github PK
View Code? Open in Web Editor NEWSimple, minimal, and efficient Dart web developement framework.
Home Page: https://github.com/maiah/synth
Simple, minimal, and efficient Dart web developement framework.
Home Page: https://github.com/maiah/synth
When I am using your example setup and try to run it with the latest sdk at revision 14458
or revision 14167
I receive following error when I visit http://localhost:7000
Unhandled exception:
NoSuchMethodError : method not found: 'call'
Receiver: Array
Arguments: []
#0 _HttpServer.listenOn.onConnection.<anonymous closure> (dart:io:3151:11)
#1 _HttpConnection._onConnectionClosed (dart:io:3062:14)
#2 _HttpConnectionBase._onError (dart:io:3010:24)
#3 _HttpConnection._HttpConnection.<anonymous closure> (dart:io:3058:40)
#4 _HttpParser.writeList (dart:io:4332:14)
#5 _HttpConnectionBase._onData._onData (dart:io:2991:41)
#6 _SocketBase._multiplex (dart:io-patch:399:26)
#7 _SocketBase._sendToEventHandler.<anonymous closure> (dart:io-patch:500:20)
#8 _ReceivePortImpl._handleMessage (dart:isolate-patch:37:92)
This works on revision 13851
.
I tried to debug this but couldn't get to the bottom of it. Not sure if this is a language bug or a bug in the framework.
Any help would be greatly appreciated.
Matt
Provide a session middleware.
Create a Middleware platform wherein users can start building server on it.
Create typedefs for Function declarations in the library to preserve function object parameter types.
Long story short. I have routes that does some database lookup with an API based on Futures.
Then problem is, that the lines 102-107 in ehttp.dart makes it impossible to do this since the outputStream is being closed as soon as the inputstream is.
synthReq.inputStream.onClosed = () {
// Close response stream if needed.
if (!synthRes.outputStream.closed) {
synthRes.outputStream.close();
}
};
Perhaps I'm doing something wrong.
Removing these lines does make it work but it has a sideeffect in my middlewares.
Provide a way to add a middleware on a specific route. The code is something like below.
...
void myMiddleware(req, res, next) {
...
}
...
route('GET', '/', myMiddleware, (req, res)
=> res.write('Hello, World!'));
Create an enhanced HTTP request object that can be used by request handlers and middlewares.
Provide a mechanism on how to handle errors emitted by middlewares.
Make the library adhere to Pub manager. And update the README.md w/ this.
Provide a redirect
method to Response
object that can be used by middlewares and user request-handlers.
Proposed usage:
res.redirect('/some/path/here');
Breakdown the examples into multiple files.
Maybe this can be handled by reqContent
middleware.
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.