sails README

The project's README from github.com/balderdashy/sails. As one markdown file: README.md.

Sails.js

Website   Get Started   Docs   News   Submit Issue

NPM version   Gitter   Twitter Follow

Sails.js is a web framework that makes it easy to build custom, enterprise-grade Node.js apps. It is designed to resemble the MVC architecture from frameworks like Ruby on Rails, but with support for the more modern, data-oriented style of web app & API development. It's especially good for building realtime features like chat.

Since version 1.0, Sails supports await out of the box. This replaces nested callbacks (and the commensurate error handling) with simple, familiar usage:

var orgs = await Organization.find();

Installation  

With node installed:

# Get the latest stable release of Sails
$ npm install sails -g
Upgrading from an earlier version of Sails?

Upgrade guides for all major releases since 2013 are available on the Sails website under Upgrading.

Your First Sails Project

Create a new app:

# Create the app
sails new my-app

Lift sails:

# cd into the new folder
cd my-app

# fire up the server
sails lift

Screenshot from the original Sails video

For the most up-to-date introduction to Sails, get started here.

Compatibility

Sails is built on Node.js, Express, and Socket.io.

Sails actions are compatible with Connect middleware, so in most cases, you can paste code into Sails from an existing Express project and everything will work-- plus you'll be able to use WebSockets to talk to your API, and vice versa.

The ORM, Waterline, has a well-defined adapter system for supporting all kinds of datastores. Officially supported databases include MySQL, PostgreSQL, MongoDB, Redis, and local disk / memory. Community adapters exist for CouchDB, neDB, SQLite, Oracle, MSSQL, DB2, ElasticSearch, Riak, neo4j, OrientDB, Amazon RDS, DynamoDB, Azure Tables, RethinkDB and Solr; for various 3rd-party REST APIs like Quickbooks, Yelp, and Twitter, including a configurable generic REST API adapter; plus some eclectic projects.

Powered by MySQL                                

For the latest core adapters and notable community adapters, see Available Adapters.

Tutorial Course

Books

Support

Need help or have a question?

Issue submission

Please read the submission guidelines and code of conduct before opening a new issue. Click here to search/post issues in this repository.

Contribute

There are many different ways you can contribute to Sails:

Please carefully read our contribution guide and check the build status for the relevant branch before submitting a pull request with code changes.

Team

Sails is actively maintained with the help of many amazing contributors. Our core team consists of:

Mike McNeil Kelvin Omereshone Eric Shaw
Mike McNeil Kelvin Omereshone Eric Shaw

Our company designs/builds Node.js websites and apps for startups and enterprise customers. After building a few applications and taking them into production, we realized that the Node.js development landscape was very much still the Wild West. Over time, after trying lots of different methodologies, we decided to crystallize all of our best practices into this framework. Six years later, Sails is now one of the most widely-used web application frameworks in the world. I hope it saves you some time! :)

License

MIT License Copyright © 2012-present, Mike McNeil

Sails is built around so many great open-source technologies that it would never have crossed our minds to keep it proprietary. We owe huge gratitude and props to Ryan Dahl (@ry), TJ Holowaychuk (@tj), Doug Wilson (@dougwilson) and Guillermo Rauch (@rauchg) for the work they've done, as well as the stewards of all the other open-source modules we use. Sails could never have been developed without your tremendous contributions to the JavaScript community.

A squid peering inside a book, halation and cosmic Sails.js knowledge emanating from the pages of the substantial tome

sails (balderdashy/sails)

Searching Database…

22.8K ·GitHub
What is this?Sails.js is a realtime MVC web framework for Node.js, designed to make it easy to build custom, enterprise-grade apps and APIs, with a structure inspired by Ruby on Rails.
Is it a framework or a library?It's a full framework: it provides the app structure, CLI generators, routing, and an ORM, rather than just a set of utility functions you import.
How do I get it running?Install Node, then create a new app and 'lift' (start) the server using the Sails CLI.
Do I need anything installed before using it?Just Node.js (version 0.10.0 or newer) and npm; Sails itself is distributed as an npm package built on Express and Socket.io.
Is upgrading between versions easy?Not automatically — jumping between major versions requires following dedicated upgrade guides published on the Sails website since 2013.
Can I reuse my existing Express code?Yes — Sails actions are compatible with Connect middleware, so most existing Express project code can be pasted in directly and will work, with WebSocket support added on top.
What databases does Sails support out of the box?Officially supported adapters include MySQL, PostgreSQL, MongoDB, Redis, and local disk/memory, via its built-in ORM called Waterline. Community adapters extend this to CouchDB, SQLite, Oracle, MSSQL, DynamoDB, ElasticSearch, and many more.
Does it support realtime features like chat?Yes, Sails is built on Socket.io alongside Express, so you can use WebSockets to talk to your API in addition to regular HTTP, making it especially suited for realtime features like chat.
Do I need to write callback-heavy code?No — since version 1.0, Sails supports async/await out of the box, replacing nested callbacks and their error handling with simpler, familiar syntax.
Why was Sails created instead of using plain Express?The creators built Node.js apps for startups and enterprises and found the ecosystem lacked conventions, so they crystallized their best practices from many projects into this MVC-style framework on top of Express and Socket.io.
What are similar projects?carno.js, Perfect, fiber, iris, node-restify, express, koa, hapi
Size
12.9 MB
Stars
22.8K
Age
14y
Commits · 90 Days