Skip to content

OsirisFrik/sails-js-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SailsJS Snippets

Visual Studio Code SailsJS sinppets collection.

VSCode PoweByCommunity SailsJs

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

  1. Fork
  2. Update snippets.json following the standard
  3. Make PullRequest
  4. Be happy and go for a beer or coffe :)