deployd / docs

documentation for deployd
http://docs.deployd.com
29 stars 30 forks source link

Update adding-logic.md (add async and hook-files) #73

Closed coderofsalvation closed 7 years ago

coderofsalvation commented 7 years ago

This will resolve:

https://github.com/deployd/docs/issues/60 https://github.com/deployd/deployd/pull/591

and new user onboarding:

5 dec 2016 @ https://gitter.im/deployd/deployd

Hey folks. Sorry if this has been asked before.
I need to modify some user data in onGet or onPost, but it looks like the script returns the user object before my synchronous task is completed
Encryption.encrypt(this.name, function(err, result) {
// doing stuff that takes a long time
}
//user object is returned before my encryption is competed
I'm a node newbie so there could be an obvious solution I'm not aware of
NicolasRitouet commented 7 years ago

Great, I love documentation PRs 👍