macro-swift / macroexpress Goto Github PK
View Code? Open in Web Editor NEWAn unopinionated SwiftNIO based web framework, Express.js/Connect like.
License: Apache License 2.0
An unopinionated SwiftNIO based web framework, Express.js/Connect like.
License: Apache License 2.0
As per 0.8.0 / Issue #7 we now support multipart/form-data uploads "multer style". 0.8.0 only supports the MemoryStorage though, DiskStorage is prepared but not implemented.
Adding DiskStorage needs a little refactoring to support proper async writing to disk and all the back-n-forth due to this. The multer DiskStorage also has async callbacks to decide on storage names and such.
To implement this, the multer.Context needs to provide the DiskStorage a place to store processing state, i.e. what async operations are still running and need to complete before next
can be called.
There is an HTTP header called Host
, so it could be great to have a native way to filter host to have different routes depending of them.
For example, you can have a example.com
domain and filter host to have different routes depending on if we call example.com
or api.example.com
(and many more possibilities)
Thanks for putting this project out there! I love its straightforward nature. I'm trying to read an array of checkboxes from a form. Is there a way to make the body parser support arrays?
We need a body parser for multipart/form-data
uploads, as per apple/swift-nio#1724 (comment)
I.e. to handle things like
<form action="/upload" method="POST" enctype="multipart/form-data">
<input type="file" id="filename" name="file" onchange="onchanged()" multiple="multiple" />
<input type="submit" value="Upload">
</form>
Need to check whether there is a more official Node API for that. Generally I'd think this should stream the files to a temporary location, keep the file handles open, but unlink them - or just regular tmpfiles. The body
structure would then have a reference to the file handles.
It would be really nice to support async/await in Swift 5.5, but alas, it requires thread hopping towards SwiftNIO, which makes it kinda useless.
So let's wait until Swift supports custom executors (and potentially SwiftNIO 3), which would presumably allow integration w/ SwiftNIO.
Peer to Macro issue: Macro-swift/Macro#3
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.