Northeastern-Electric-Racing / PM-Dashboard-v2

Northeastern Electric Racing Project Management Dashboard - version 2
https://nerpm.netlify.app
GNU Affero General Public License v3.0
15 stars 2 forks source link

Research - Netlify for Deployment #1

Closed kevinyu328 closed 3 years ago

kevinyu328 commented 3 years ago

Since we are quite sure we will be using Netlify for deployment, it will be great to do some research on the functionalities it has. Look into functionalities such as severless functions, user authentication, deployment, and consider its compatibility with PostgreSQL.

Put longer notes here in this issue, along with potential sample code and any other thoughts. And then you can put a couple bullets summary / thoughts in this document.

albeartoz commented 3 years ago

Netlify

Front End (Netlify build)

Builds

Deploys

User authentication

Form submissions

Serverless functions and PostgreSQL

albeartoz commented 3 years ago

I'll need to do more research on serverless functions, but the Netlify docs leave a lot to be desired. It feels like they expect you to already know how to make serverless functions before reading the docs.

jamescd18 commented 3 years ago

This is a fantastic start and provides great background info on Netlify's features. Great job!

We won't have access to the Netlify CLI and the Netlify UI due to our deployment arrangement, but I'm not entirely sure how that will impact things. I know we can still run the application locally and deploy it just fine.

I also suspect that we'll avoid using netlify form submissions and netlify user authentication, at least in part due to those features relying on the Netlify web UI.

That kinda sucks about the documentation, but if it helps at all, documentation about AWS Lambda can sometimes apply to Netlify functions. Netlify functions is basically a wrapper around AWS Lambda, so many of the same features / quirks are passed through. (For example the event and context parameters, as well as the 1GB RAM limit)

For serverless functions + PostgreSQL, it should theoretically be the same as any other database setup. Connect with an npm package after supplying a connection url and credentials. Then likely we'll have an ORM sit between the functions and the database connection. See #2 for the ORM side and #14 for some complexities with serverless functions in Netlify.

jamescd18 commented 3 years ago

Gonna go ahead and close this issue since I think the specifics of env vars and specifics with serverless functions will be explored in other issues moving forward.