These methods come from that routes file that we defined it earlier.
So it actually understands what's going on here and generates an S Dick.
Code.exe > routes.js - app - Visual Studio Code
Four year APP on behalf.
So when we take a look at
Where was that? Maybe
Put C put Account update profile.
Well, we actually get that method here. Update profile.
chrome.exe > NEW_APP_NAME - Google Chrome
If we wanted to create our own Sammy made put Hello, world when we re rendered the S D K when I regenerated it that would show up here as well. We're not gonna do that for right now. But the point is that these are actually dynamically generated by the routes. I think that's super cool.
Code.exe > routes.js - app - Visual Studio Code
Okay, So what we're going to do now is we're going to use this update profile to update based on the value here, so let's use cloud.
Update PROFILE. I think it looks like this with this. You want to do with ramp?
chrome.exe > NEW_APP_NAME - Google Chrome
Actually going to do that here in the helo world Run day and hello, world up, Paige.
Code.exe > routes.js - app - Visual Studio Code
When is updated So new view update profile with
We can actually just call that new value.
See if that works.
Code.exe > ● hello-world.page.js - app - Visual Studio Code
No, no. Doesn't like that Cloud update profile with is not a function.
Commit 00e26415f4ba9756797043edd82e707241a0531f
--- app/assets/js/pages/hello-world.page.js
+++ app/assets/js/pages/hello-world.page.js
@@ -11,6 +11,7 @@ parasails.registerPage('hello-world', {
me: {
deep: true,
handler: function (newValue) {
+ Cloud.updateProfile().with(newValue)
}
}
},
Okay, Well, maybe we can just
Code.exe > hello-world.page.js - app - Visual Studio Code
Maybe it isn't with. Maybe it's just like that.
Yeah, that was him.
Commit 0c7f1dcafdff9a47187e17f1f06283d7a25a8ea0
--- app/assets/js/pages/hello-world.page.js
+++ app/assets/js/pages/hello-world.page.js
@@ -11,7 +11,7 @@ parasails.registerPage('hello-world', {
me: {
deep: true,
handler: function (newValue) {
- Cloud.updateProfile().with(newValue)
+ Cloud.updateProfile(newValue)
}
}
},
Okay, So are we updating? I think so. But let's just double check.
chrome.exe > NEW_APP_NAME - Google Chrome
Oh, you know what it is? I think it's like this. Yeah, Maybe it's like that.
Code.exe > hello-world.page.js - app - Visual Studio Code
Yeah. There we go.
Commit 1770afc47da71c2484351b94e2afc4ed790a4f4a
--- app/assets/js/pages/hello-world.page.js
+++ app/assets/js/pages/hello-world.page.js
@@ -11,7 +11,7 @@ parasails.registerPage('hello-world', {
me: {
deep: true,
handler: function (newValue) {
- Cloud.updateProfile(newValue)
+ Cloud.updateProfile.with(newValue)
}
}
},
So I believe that this should be updating the back end.
When we change things, no.
Okay, Let's just try this again, so I'm not exactly sure what it wass.
chrome.exe > NEW_APP_NAME - Google Chrome
Commit d8bb25892e6f99b713bbdf71f114571ef256f7d4
--- app/assets/js/pages/hello-world.page.js
+++ app/assets/js/pages/hello-world.page.js
@@ -11,7 +11,7 @@ parasails.registerPage('hello-world', {
me: {
deep: true,
handler: function (newValue) {
- Cloud.updateProfile.with(newValue)
+ Cloud.updateProfile(newValue)
}
}
},
Listen, double checked out. This is still being
Code.exe > hello-world.page.js - app - Visual Studio Code
Still going on here?
Yes, that's still triggering.
Commit f466b1edbf383c8a1318ba46d5bf0dfe4f1af8ea
--- app/assets/js/pages/hello-world.page.js
+++ app/assets/js/pages/hello-world.page.js
@@ -11,6 +11,7 @@ parasails.registerPage('hello-world', {
me: {
deep: true,
handler: function (newValue) {
+ console.log('going')
Cloud.updateProfile(newValue)
}
}
Going to reference the docks. Sales cloud. Um
chrome.exe > NEW_APP_NAME - Google Chrome
Update Forget how it is.
All right sales as clouds decay.
chrome.exe > sails cloud update - Google Search - Google Chrome
I need to do and we go. Maybe this will tell us how to do it.
Yeah, Cloud do something dot with a crowd. Update profile.
chrome.exe > sailsjs cloud sdk - Google Search - Google Chrome
With. Okay, Let's make sure let's see if that works.
Commit a25581bd34b0a4a3d47f8950c75b35627feb83df
--- app/assets/js/pages/hello-world.page.js
+++ app/assets/js/pages/hello-world.page.js
@@ -12,7 +12,7 @@ parasails.registerPage('hello-world', {
deep: true,
handler: function (newValue) {
console.log('going')
- Cloud.updateProfile(newValue)
+ Cloud.updateProfile.with(newValue)
}
}
},
chrome.exe > Ration - Google Chrome
Okay, And we're looking at the network job to meet to see if those requests go through.
Or not, which was interesting, I think. Oh, I know what we might need him. It's a sink, so we need to do a weight. That's what's problem. Wass.
chrome.exe > NEW_APP_NAME - Google Chrome
A weight is only valid in tracing function.
Commit b592c69d27fd1301ea0300ab3ef967b9c3b3c193
--- app/assets/js/pages/hello-world.page.js
+++ app/assets/js/pages/hello-world.page.js
@@ -12,7 +12,7 @@ parasails.registerPage('hello-world', {
deep: true,
handler: function (newValue) {
console.log('going')
- Cloud.updateProfile.with(newValue)
+ await Cloud.updateProfile.with(newValue)
}
}
},
A sink.
Code.exe > hello-world.page.js - app - Visual Studio Code
Okay, There we go.
So now we're updating the profile. We can see the responses Come in here in sales, right? So sales actually receiving those, And when we refresh the page, my name has been changed. So there we go.
Commit 9f446ee6828a04ac33e83fa1537f388421a95106
--- app/assets/js/pages/hello-world.page.js
+++ app/assets/js/pages/hello-world.page.js
@@ -10,7 +10,7 @@ parasails.registerPage('hello-world', {
watch: {
me: {
deep: true,
- handler: function (newValue) {
+ handler: async (newValue) => {
console.log('going')
await Cloud.updateProfile.with(newValue)
}
chrome.exe > NEW_APP_NAME - Google Chrome
Now. Typically, you wouldn't want to do this on every key press.
But it demonstrates the persistence, right?
So that's all I'm going to cover for today.
That's a basic round loop of how you would render a route, get some info from the database and publish it. Obviously, there's a lot more to learn. Sales comes from comes with a bunch of awesome utilities to do things like Configure your production in staging environments.
Create Esti Kay's. You can configure this data stores actually on disk, but you can configure to use like reddest or Mangalore. Both translate stuff. Sales is all Sam and I highly recommend it.
Code.exe > hello-world.page.js - app - Visual Studio Code