menu

ZEIT

Our mission is to make cloud computing as easy and accessible as mobile computing. You can find our Next.js community here.

Channels
Team
Posts
Members
Info

Disconnect DB (MongoDB using Mongoose) when micro-dev restarts

How can I do listen to micro-dev restart, then I want to disconnect my database?

thumbsup
0
message-simple
0

What's the difference between deploy apollo-server-micro and apollo-server?

thumbsup
0
message-simple
2

Mongoose .findOne() breaks when deployed

Hi everyone! I have Micro endpoints for my API that uses Mongoose. All of them work fine, except the one that uses .findOne(). This one returns the right data locally, but not when deployed to Now v2. Here is the endpoint: And here is the output: The weird thing to me is that I…

thumbsup
0
message-simple
7

Unexpected JSON in logger [resolved]

I often satisfy lambda requests with: but that function (defined in log.js), passes it to logResponse as seen below: which expects to parse it as a JSON object, and that therefore fails. please see attached picture below

thumbsup
1
message-simple
5

req.connection.encrypted [resolved]

with Express the request object contains the above information, which I can use to properly build a url (it lets me know whether to use "http" or "https"). this seems to be missing from Micro. how can I tell if the call was encrypted?

thumbsup
0
message-simple
12

micro - initialisation

Hey, I was googling around for a good way to do a 'once off initialisation' before starting my app. My startup logic is async. Has anyone got any suggestions about how to go about this with Micro?

thumbsup
0
message-simple
1

How to run Micro on Now V2

Ive written a small graphql service using micro (followed the example). It runs fine under micro-dev and micro on my localhost. It deploys and runs under Now V1 but doesn't run under Now V2. Im using the @now/node builder which reports a successful. But i get a 504: An error…

thumbsup
2
message-simple
20

New library for Micro on AWS Lambda

We're open sourcing this new library for running Micro functions on AWS Lambda. We've been using it in production for a while and consider it stable for release to the world: https://github.com/nathancahill/aws-serverless-micro

thumbsup
0
message-simple
3

npm i -g micro-dev - errors?

I figured I'd install micro-dev globally rather than every time in my repo, particularly as most of my micro-based projects are single files. But when I run the globally installed micro-dev in a directory with a single index.js (that contains a hello-world micro response), I get…

thumbsup
0
message-simple
7

TypeError: Chaining cycle detected for promise #<Promise>

I'm getting this error with a very short stack trace: "at process.internalTickCallback (internal/process/next_tick.js:77:7) and is emanating out of Micro. the error pops up on the call to runMicroTasks() and happens with both micro and micro-dev. I would post a picture here but…

thumbsup
0
message-simple
2