!nUoTgEvlAqyrKwctnB:matrix.org

macchiato

86 Members
Macchiato framework for ClojureScript and Node https://github.com/macchiato-framework25 Servers

Load older messages


SenderMessageTime
15 Mar 2018
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb joined the room.11:16:27
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb anybody try to pipe a node stream straight to the response with macchiato? 11:16:28
@_slack_clojurians_U050CBXUZ:matrix.orgyogthos 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
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb 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
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb how do I use node.js global objects like Buffer in macchiato? 12:25:29
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb nvm forgot about constructor interop. (js/Buffer. size) did the trick 12:36:55
@_slack_clojurians_U0FKCGH9N:matrix.orgjoshua.d.horwitz joined the room.23:35:29
@_slack_clojurians_U0FKCGH9N:matrix.orgjoshua.d.horwitz Hi all, coming from Node and excited about this 23:35:35
@_slack_clojurians_U0FKCGH9N:matrix.orgjoshua.d.horwitz set a profile picture.23:35:35
22 Mar 2018
@_slack_clojurians_U050CBXUZ:matrix.orgyogthos 👋 03:02:19
13 Apr 2018
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb i 13:15:21
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb i'm trying to receive json data through a post to a macchiato server, using this example for middleware: 13:15:41
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb https://github.com/macchiato-framework/examples/blob/master/cljsbin/src/cljsbin/middleware.cljs 13:15:44
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb doesn't work though. i get back a response with "Unexpected token " in JSON at position 0" 13:18:46
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb seems to be generated from the json wrap-node-middleware as seen on line 16 13:19:23
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb the post request just has content-type set to application/json with the json string as raw data in the body 13:20:00
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb any tips? am I missing some additional middleware to deal with application/json properly? 13:20:25
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb for the record the json i'm testing with is just this 13:22:09
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb "{\"foo\": 1, \"bar\": 2, \"baz\": [1,2,3]}" 13:22:10
@_slack_clojurians_U0C8489U6:matrix.orgrichiardiandrea joined the room.17:34:05
@_slack_clojurians_U0C8489U6:matrix.orgrichiardiandrea 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
@_slack_clojurians_U0C8489U6:matrix.orgrichiardiandrea 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
@_slack_clojurians_U0C8489U6:matrix.orgrichiardiandrea it is awesome because with this and lumo npm integration folks can get rid of lein 20:51:03
@_slack_clojurians_U04V70XH6:matrix.orgseancorfield joined the room.21:17:55
@_slack_clojurians_U04V70XH6:matrix.orgseancorfield Careful! It's a work in progress and it still has a bunch of sharp edges! 🙂 21:17:56
@_slack_clojurians_U04V70XH6:matrix.orgseancorfield 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
@_slack_clojurians_U52RNHDRN:matrix.orgrestenb what's the correct way to wrap application/json in middleware with macchiato? 08:39:10
@_slack_clojurians_U050CBXUZ:matrix.orgyogthos 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
@_slack_clojurians_U050N5T47:matrix.orgjuliobarros joined the room.17:42:55
@_slack_clojurians_U050N5T47:matrix.orgjuliobarros Can a Macchiato app be deployed to AWS lambda? Does that question even make sense? 😃 17:42:56

Show newer messages


Back to Room ListRoom Version: