15 Mar 2018 |
| restenb joined the room. | 11:16:27 |
restenb | anybody try to pipe a node stream straight to the response with macchiato? | 11:16:28 |
yogthos | should work same as here https://github.com/macchiato-framework/macchiato-core/blob/master/src/macchiato/util/response.cljs#L57
```
(defn file
"accepts a path to a file, and returns a response with the body set to the file stream."
[path]
{:status 200
:headers {}
:body (fs/read-stream path)})
``` | 15:12:23 |
20 Mar 2018 |
restenb | I need to use the node.js Buffer object in some interop I have, but I'm not sure how to access it. | 12:21:35 |
restenb | how do I use node.js global objects like Buffer in macchiato? | 12:25:29 |
restenb | nvm forgot about constructor interop. (js/Buffer. size) did the trick | 12:36:55 |
| joshua.d.horwitz joined the room. | 23:35:29 |
joshua.d.horwitz | Hi all, coming from Node and excited about this | 23:35:35 |
| joshua.d.horwitz set a profile picture. | 23:35:35 |
22 Mar 2018 |
yogthos | 👋 | 03:02:19 |
13 Apr 2018 |
restenb | i | 13:15:21 |
restenb | i'm trying to receive json data through a post to a macchiato server, using this example for middleware: | 13:15:41 |
restenb | https://github.com/macchiato-framework/examples/blob/master/cljsbin/src/cljsbin/middleware.cljs | 13:15:44 |
restenb | doesn't work though. i get back a response with "Unexpected token " in JSON at position 0" | 13:18:46 |
restenb | seems to be generated from the json wrap-node-middleware as seen on line 16 | 13:19:23 |
restenb | the post request just has content-type set to application/json with the json string as raw data in the body | 13:20:00 |
restenb | any tips? am I missing some additional middleware to deal with application/json properly? | 13:20:25 |
restenb | for the record the json i'm testing with is just this | 13:22:09 |
restenb | "{\"foo\": 1, \"bar\": 2, \"baz\": [1,2,3]}" | 13:22:10 |
| richiardiandrea joined the room. | 17:34:05 |
richiardiandrea | Hello folks I have contributed all the package.json but not actually tried if the lumo compatible, they should all be because I haven't seen of macros | 17:34:07 |
richiardiandrea | So yogthos, seancorfield made us a present:
```
clj -Sdeps '{:deps {seancorfield/clj-new {:git/url "https://github.com/seancorfield/clj-new" :sha "a87bdc0347fe1523e8d85283d94b06f5dd68b2cb"}}}' -m clj-new.create macchiato mcto-test
Quick Start
-----------
run the compiler:
cd macc-test
lein build
run Node.js in another terminal:
cd macc-test
npm start
see README.md for further instructions
``` | 20:49:33 |
richiardiandrea | it is awesome because with this and lumo npm integration folks can get rid of lein | 20:51:03 |
| seancorfield joined the room. | 21:17:55 |
seancorfield | Careful! It's a work in progress and it still has a bunch of sharp edges! 🙂 | 21:17:56 |
seancorfield | Feel free to add issues for anything you find that is broken or missing (it doesn't support template arguments yet, nor any of the myriad command-line switches that it's sibling boot-new has... | 21:18:50 |
15 Apr 2018 |
restenb | what's the correct way to wrap application/json in middleware with macchiato? | 08:39:10 |
yogthos | the restful-format middleware handles format translations https://github.com/macchiato-framework/macchiato-core/blob/9271dd58c34421e85ccab7a0fc42a56deaf4794e/src/macchiato/middleware/restful_format.cljs#L84 | 12:31:17 |
18 May 2018 |
| juliobarros joined the room. | 17:42:55 |
juliobarros | Can a Macchiato app be deployed to AWS lambda? Does that question even make sense? 😃 | 17:42:56 |