Can I run a front-end and back-end on Netlify?
Asked Answered
P

4

6

I want to practice creating my own RESTful API service to go along with a client-side application that I've created. My plan is to use Node and Express to create a server. On my local machine, I know how to set up a local server, but I would like to be able to host my application (client and server) online as part of my portfolio.

The data that my client application would send to the server would not be significant in size, so there wouldn't be a need for a database. It would be sufficient to just have my server save received data dynamically in an array, and I wouldn't care about having that data persist if the user exits the webpage.

Is it possible to use a service like Netlify in order to host both a client and server for my purposes? I'm picturing something similar to how I can start up a local dev server on my computer so that the front-end can interface with it. Except now I want everything hosted online for others to view. I plan to create the Express server in the same repo as the front-end code.

Photolithography answered 22/3, 2021 at 23:58 Comment(0)
W
7

No, Netlify doesn't allow you to run a server or backend. However, they do allow you to run serverless functions in the cloud. These can run for up to 10 sec. at a time. Furthermore Netlify also have a BETA solution called "background functions" That can run for up to 15 minutes. But honestly for a RESTful API there sure would be better solutions out there?

Wodge answered 25/3, 2021 at 14:15 Comment(0)
M
2

If you are still looking for the Netlify for Backend you can consider Qovery. They explained here why it is a good fit for their users.

Marianelamariani answered 26/4, 2022 at 17:24 Comment(0)
U
1

Netlify has Functions similar to AWS Lambda functions, which are designed for writing, for example, an API endpoint.

Uninterrupted answered 17/5, 2023 at 23:19 Comment(1)
Functions are just Lambas. At least up until a few years ago, Netlify was virtually a DX front for AWS.Sextain
F
0

You can host a frontend and backend on Render with their free tier. Reasonably straight forward setup process!

Checkout this forum discussion from their website: https://community.render.com/t/how-to-deploy-frontend-and-backend-on-render/7449

Fraxinella answered 30/4, 2024 at 17:23 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.