Giter VIP home page Giter VIP logo

macroexpress's People

Contributors

helje5 avatar mcritz 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

macroexpress's Issues

Add support for async/await (pending custom executors)

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

How does one handle an array of inputs?

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?

A sort a virtual host support in MacroExpress

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)

Support `multipart/form-data` uploads

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.

Support DiskStorage in multer

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.

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.