mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-12-18 16:41:58 +00:00
Bash: Fix issue with $websites
This commit is contained in:
parent
c368ad3b06
commit
dc306a3364
@ -90,6 +90,29 @@ myService.on(eventname, listener) // registers a listener metho
|
||||
myService.emit(eventname, data) // emits the event eventname to all event listeners
|
||||
myService.removeListener(eventname, [ listener ]) // removes all listeners (or the given listener) for eventname
|
||||
|
||||
// Hooks are pluggable middleware functions that can be registered
|
||||
// before, after or on errors of a service method. You can register a
|
||||
// single hook function or create a chain of them to create complex work-flows.
|
||||
app.service('messages').hooks({
|
||||
before: {
|
||||
create(context) {
|
||||
context.data.createdAt = new Date();
|
||||
},
|
||||
|
||||
update(context) {
|
||||
context.data.updatedAt = new Date();
|
||||
},
|
||||
|
||||
patch(context) {
|
||||
context.data.updatedAt = new Date();
|
||||
}
|
||||
},
|
||||
|
||||
error(context) {
|
||||
console.error(`Error in ${context.path} calling ${context.method} method`, context.error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/* *******************************************************************************************
|
||||
* 2. TRANSPORT: Expose a Feathers application as an API server.
|
||||
|
@ -376,7 +376,7 @@ cd; nano .bashrc
|
||||
> export websites="/Users/mac/Documents/websites"
|
||||
|
||||
source .bashrc
|
||||
cd websites
|
||||
cd $websites
|
||||
|
||||
|
||||
##############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user