Creating a REST API with Node.js and MySQL

preview_player
Показать описание


Timestamps:
0:00 - Intro
0:45 - Creating a CloudSQL instance/server
2:15 - Creating and populating a database on the server
5:16 - Creating a simple health check in the REST API
7:05 - Writing code to fetch database content for the REST API
9:38 - Deploying the REST API to Cloud Run
10:54 - Testing the read-only REST API
12:18 - Implementing writing to the database through the REST API
16:50 - Testing the write-part of the REST API

#ServerlessExpeditions #ServerlessExpeditionsExtended #CloudRun

Product: Cloud Run; fullname: Roger Martinez, Martin Omander;
Рекомендации по теме
Комментарии
Автор

Great example on Cloud Run, but in the development loops, it's important to show how to test locally with the database and then how to deploy in the cloud.

guillaumeblaquiere
Автор

I'm getting the following error:
"Error: connect ENOENT /cloudsql/<my db>
at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1142:16)" from my nodejs application when it attempts to connect to CloudSql. The API is enabled.

derekchin
Автор

Great video, thank you! Well explained and a good level and pace for me (junior dev just starting out). That deploy script was a great little bit of bonus learning too

nickroach
Автор

Such a refreshing theme to start off a technical video! Great job Google! :)

VinayNair
Автор

Nice explanation, clear and direct to the point.

brandonliralizarraga
Автор

I really like Cloud Shell for GCP. It is so easy to build basic things in it.

akin
Автор

Can you please share the contents of the Dockerfile?

derekchin
Автор

What's the life expectancy of a chihuahua? How about a Boston Terrier? A Dachshund? Asking for a friend :)

adrienneparks
Автор

How to load test the get request here?

vengateshm
Автор

Well explained, can you come up with a another vlog, which shows how to authorise these endpoints ( basic auth, oauth2 client cred )

purankotwalyoutub
Автор

My nodejs app still can't connect to the MySql idk what I did wrong and it's driving me insane.

muhammadarifbillah
Автор

Please explain more about secrets manager.

yeeshupandey
Автор

@Roger: next time that you talk about "dog breeds" can you also share a picture of it? I already have difficulties to remind me what is the dog breed in my native language (French), so with the english naming, I'm totally lost!!! Ok, I can search on Google, but just a quick pict could be better!

guillaumeblaquiere
Автор

Can you please post the source code link here

aravindsirangu
Автор

i got error while deploy`gcloud command not found `

surajkawale
Автор

So no vpc-connector was required for this cloud run code?

KevinBoutin
Автор

This database isn't exactly serverless, is it? The REST API is able to scale nicely from 0 to a lot, but the database wont scale automatically at all. Most importantly, it does not scale to 0. What I appreciate about serverless is its pay per use model. The database layer often makes that difficult.

etiennebruines