Closed kevinyu328 closed 3 years ago
npm run {YOUR_BUILD_SCRIPT}
return (
<form data-netlify="true" name="pizzaOrder" method="post" onSubmit={handleSubmit}>
<input type="hidden" name="form-name" value="pizzaOrder" />
<label>What order did the pizza give to the pineapple?
<input name="order" type="text" onChange={handleChange} />
</label>
<input type="submit"/>
</form>
)
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.
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.
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.
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.