Beginner’s Guide for Creating a Serverless REST API using NodeJS over Google Cloud Functions

API REST using Google Cloud Functions (Serverless)

Serverless application has gained a lot of importance over time. It allows focussing on your app code/tests without worrying about configurations, deployment process or scalability.

We’re going to create a function that will be exposed via rest URL. That function will be invoked every time a HTTP(S) request is received.

During execution, an express server will be summoned exposing our REST services.

What we are going to build?

  • Express API for CRUD services(create, read, update and delete) on a Firestore database.
  • Use Google Cloud Function to expose our Express server
  • Deploy our Google Cloud Function using Cloud CLI.

 Creating our firebase project

In order to create our first project, let’s do it here. Select add project, project’s name must be unique, let’s use prefix github-ring-{github_user}, github-ring-levinm in my case. Be sure to select Firestore as our database.

image1

 

 

 

View on dev.to