# Install a sneak peek of sails.js v0.9.0 (global install):
sudo npm install -g sails@git://github.com/balderdashy/sails.git#development
# Or, to revert to 0.8.94 (current stable release), you can do:
sudo npm install -g sails@0.8.94
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var extend = require('util')._extend; | |
var async = require('async'); | |
var Waterline = require('../node_modules/sails/node_modules/waterline'); | |
var couchdb = require('sails-couchdb-orm'); | |
var config = require('../config/adapters').adapters.couchdb; | |
couchdb.config = extend(couchdb.defaults, config); | |
module.exports = bootstrap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sio = require('socket.io'); | |
var fn = function () {}; | |
var http = require('http'); | |
module.exports = function (compound) { | |
var app = compound.app; | |
var server = http.createServer(app); | |
compound.server = server; | |
var io = compound.io = sio.listen(server); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: | |
// you may need to grab the latest version of Sails on the v0.10 branch for some of this to work | |
var sails = require('sails'); | |
// You can do a lot here, but I'll show a few important ones | |
var options = { | |
// Completely disable globals (sails, your models, your services, _, async) | |
globals: false, |
Written as both a refresher course on the mechanics of cognition in human psychology, and as the beginning of a working theory, wherein one might make some deductions from human psychology to broadly advance/improve the design of server software and data models for the industry en masse.
c. Mike McNeil, 2013-2014 All Rights Reserved.
What's the point of this? I think psychology will inevetiably instruct the future of software design, in the same way neurobiology is beginning to impact the hardware engineering industry. >
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rfc822Date = moment(yourDate).format('ddd, DD MMM YYYY HH:mm:ss ZZ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gm = require('gm'); | |
var canvasWidth = 248; | |
var canvasHeight = 389; | |
gm(__dirname + '/original.jpg').size(function(error, size) { | |
if (error) { | |
console.error(error); |
- The question of what "belongs" in a framework is complex, and depends on your use case. A better question is "what are the defaults?" By pulling all of the current features of Sails into plugins, and then including them by default, we provide full customizability (the possibility of disabling just about everything) without sacrificing all the conveniences Sails developers are used to.
- Plugins make it easier to contribute, and make modifying the core a much less scary proposition.
- Node.js is quite minimalist, and super awesome. Let's take a leaf out of Ryan/Isaac's book!
- Community plugins are fantastic, but to ensure quality, plugins will only be listed on the Sails website/repo when they've met some basic quality assurance testing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios-https-proxy-fix'); | |
/** | |
* @author Caleb Lemoine | |
* @param {object} opts easy-soap-request options | |
* @param {string} opts.url endpoint URL | |
* @param {object} opts.headers HTTP headers, can be string or object | |
* @param {string} opts.xml SOAP envelope, can be read from file or passed as string | |
* @param {int} opts.timeout Milliseconds before timing out request | |
* @param {object} opts.proxy Object with proxy configuration |
OlderNewer