Reference

The reference documentation focuses on usage, and explains the specifics of how to work with the various methods and properties available to you when developing a Sails app.

Table of Contents

  1. Application
    1. Advanced usage
      1. Lifecycle
      2. sails.LOOKS_LIKE_ASSET_RX
      3. sails.getActions()
      4. sails.getRouteFor()
      5. sails.lift()
      6. sails.load()
      7. sails.lower()
      8. sails.registerAction()
      9. sails.registerActionMiddleware()
      10. sails.reloadActions()
      11. sails.renderView()
      12. sails.request()
      13. sails.getBaseUrl()
    2. sails.config.custom
    3. sails.getDatastore()
    4. sails.getUrlFor()
    5. sails.log()
  2. Blueprint API
    1. add to
    2. create
    3. destroy
    4. find one
    5. find where
    6. populate where
    7. remove from
    8. replace
    9. update
  3. Command-line interface
    1. sails --version
    2. sails console
    3. sails debug
    4. sails generate
    5. sails inspect
    6. sails lift
    7. sails new
  4. Configuration
    1. sails.config.*
    2. sails.config.blueprints
    3. sails.config.bootstrap()
    4. sails.config.custom
    5. sails.config.datastores
    6. sails.config.globals
    7. sails.config.http
    8. sails.config.i18n
    9. sails.config.log
    10. sails.config.models
    11. sails.config.policies
    12. sails.config.routes
    13. sails.config.security
    14. sails.config.session
    15. sails.config.sockets
    16. sails.config.views
  5. Request (`req`)
    1. req._startTime
    2. req.body
    3. req.cookies
    4. req.fresh
    5. req.headers
    6. req.hostname
    7. req.ip
    8. req.ips
    9. req.isSocket
    10. req.method
    11. req.options
    12. req.originalUrl
    13. req.params
    14. req.path
    15. req.protocol
    16. req.query
    17. req.secure
    18. req.signedCookies
    19. req.socket
    20. req.subdomains
    21. req.url
    22. req.wantsJSON
    23. req.xhr
    24. req.accepts()
    25. req.acceptsCharsets()
    26. req.acceptsLanguages()
    27. req.allParams()
    28. req.file()
    29. req.get()
    30. req.is()
    31. req.param()
    32. req.setLocale()
    33. req.setTimeout()
    34. req.host
  6. Response (`res`)
    1. res.attachment()
    2. res.badRequest()
    3. res.clearCookie()
    4. res.cookie()
    5. res.forbidden()
    6. res.get()
    7. res.json()
    8. res.jsonp()
    9. res.location()
    10. res.notFound()
    11. res.ok()
    12. res.redirect()
    13. res.send()
    14. res.serverError()
    15. res.set()
    16. res.status()
    17. res.type()
    18. res.view()
    19. res.negotiate()
  7. Waterline (ORM)
    1. Datastores
      1. .driver
      2. .manager
      3. .leaseConnection()
      4. .sendNativeQuery()
      5. .transaction()
    2. Models
      1. .addToCollection()
      2. .archive()
      3. .archiveOne()
      4. .avg()
      5. .count()
      6. .create()
      7. .createEach()
      8. .destroy()
      9. .destroyOne()
      10. .find()
      11. .findOne()
      12. .findOrCreate()
      13. .getDatastore()
      14. .removeFromCollection()
      15. .replaceCollection()
      16. .stream()
      17. .sum()
      18. .update()
      19. .updateOne()
      20. .validate()
      21. .native()
      22. .query()
    3. Queries
      1. .catch()
      2. .decrypt()
      3. .exec()
      4. .fetch()
      5. .intercept()
      6. .limit()
      7. .meta()
      8. .populate()
      9. .skip()
      10. .sort()
      11. .then()
      12. .tolerate()
      13. .toPromise()
      14. .usingConnection()
      15. .where()
    4. Records
      1. .toJSON()
  8. WebSockets
    1. Resourceful PubSub
      1. .getRoomName()
      2. .publish()
      3. .subscribe()
      4. .unsubscribe()
    2. sails.sockets
      1. .addRoomMembersToRooms()
      2. .blast()
      3. .broadcast()
      4. .getId()
      5. .join()
      6. .leave()
      7. .leaveAll()
      8. .removeRoomMembersFromRooms()
      9. sails.sockets.id()
    3. Socket client
      1. io.sails
      2. io.socket
      3. SailsSocket
        1. Methods
        2. Properties
      4. io.socket.delete()
      5. io.socket.get()
      6. io.socket.off()
      7. io.socket.on()
      8. io.socket.patch()
      9. io.socket.post()
      10. io.socket.put()
      11. io.socket.request()

Using Sails at work?

If your company has the budget, consider purchasing Flagship support. It's a great way to support the ongoing development of the open source tools you use every day. And it gives you an extra lifeline to the Sails core team.

Reference

Reference