SailsJS Snippets
Visual Studio Code SailsJS sinppets collection.
Use
Prefix |
Code |
sdebug |
sails.log.debug($1)$2 |
sinfo |
sails.log.info($1)$2 |
serror |
sails.log.error($1)$2 |
shelper |
sails.helpers.$1 |
sconfig |
sails.config.$1 |
sconst |
sails.config.constants.$1 |
rbody |
req.body |
rquery |
req.query |
rparams |
req.params |
rmethod |
req.method |
rheaders |
req.headers |
rpath |
req.path |
rattachment |
res.attachment |
rbadRequest |
res.badRequest($1)$2 |
rclearCookie |
res.clearCookie($1)$2 |
rcookie |
res.cookie($1) |
rforbidden* |
res.forbidden() |
rjson |
res.json($1)$2 |
rnotFound* |
res.notFound($1)$2 |
rsend |
res.send($1)$2 |
rerror* |
res.serverError($1)$2 |
helper* |
helper template |
hinput* |
helper input obj template |
* More prefix options
Contributions
- Fork
- Update
snippets.json following the standard
- Make PullRequest
- Be happy and go for a beer or coffe :)
| |