Open in app
Ernesto Freyre
473 Followers
About

Sign in

473 Followers
About
Open in app
Ernesto Freyre

Ernesto Freyre

Aug 9, 2017·1 min read

Functions are stateless, you cannot keep a connection open between function invocations.

That’s why I connect to mongo every time, also that’s why I didn’t use mongoose, the ODM, the problem with it is it compiles the model definitions every time and that is slow. You need DBs that can respond quick from connection, query and disconnect.

Ernesto Freyre

Software Engineer @ Coalition Inc., Miami FL

Nice article.
1

Farooq AR

More from Ernesto Freyre

Software Engineer @ Coalition Inc., Miami FL

More From Medium

Create an NPM module with TypeScript

Ernesto Freyre in Level Up Coding

Deploy your NextJS Application on a different base path (i.e. not root)

Ernesto Freyre in Level Up Coding

Create a React component library with TypeScript and Storybook

Ernesto Freyre in Level Up Coding

Building a NextJS Monorepo

Ernesto Freyre in JavaScript in Plain English

The Fate Of Elon Musk’s Assistant Is A Cautionary Tale For Negotiating Salary

Nick Wolny in Entrepreneur's Handbook

The Sexiest Job of the 21st Century Isn’t “Sexy” Anymore

Nishi Kashyap in ILLUMINATION

The Exact Steps I Followed to Make $1,500+ of Passive Income Every Month

Julia Horvath in Entrepreneur's Handbook

Why Is The Age of Consent in Japan Only 13-Year-Old?

Isaiah McCall in History of Yesterday

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store