This file contains hidden or 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
/** | |
* Bootstrap | |
* | |
* An asynchronous boostrap function that runs before your Sails app gets lifted. | |
* This gives you an opportunity to set up your data model, run jobs, or perform some special logic. | |
* | |
* For more information on bootstrapping your app, check out: | |
* http://sailsjs.org/#documentation | |
*/ |
This file contains hidden or 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
if (environment === 'development') { db_connection = { | |
module : 'sails-mongo', | |
url: process.env.DB_URL, | |
schema: true | |
}} else if (environment === 'production'){ db_connection = { | |
module: 'sails-mongo', | |
url: 'mongodb://1hackerbracket1:[email protected]:10479/hackerbracket', |
This file contains hidden or 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
module.exports = { | |
port: process.env.PORT || 1337, | |
environment: process.env.NODE_ENV || 'development', | |
adparters: { | |
'default': 'mongo', | |
mongo: { |
This file contains hidden or 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
show: function (req, res, next){ | |
Hacks.findOne(req.param('id'), function foundHack(err, hack){ | |
if(err) return next(err); | |
if (!hack) return next(); | |
User.findOne(hack.owner, function foundUser(err, user){ | |
if(err) return next(err); | |
if (!user) return next(); | |
Comment.find({postID: hack.id}).sort('createdAt ASC').exec(function foundHack(err, comment){ | |
if(err) return next(err); | |
if (!comment) return next(); |
This file contains hidden or 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
warn: (to silence this warning, change `config/express.js`) | |
/Users/henry/Documents/dev/node/hackerbracket/node_modules/sails-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:242 | |
throw message; | |
^ | |
TypeError: Object #<ServerResponse> has no method 'notFound' | |
at found (/Users/henry/Documents/dev/node/hackerbracket/node_modules/sails/lib/hooks/blueprints/actions/find.js:86:35) | |
at bound (/Users/henry/Documents/dev/node/hackerbracket/node_modules/lodash/dist/lodash.js:957:21) | |
at applyInOriginalCtx (/Users/henry/Documents/dev/node/hackerbracket/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:362:80) |
This file contains hidden or 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
* For more information on adapter configuration, check out: | |
* http://sailsjs.org/#documentation | |
*/ | |
module.exports.adapters = { | |
// // If you leave the adapter config unspecified | |
// // in a model definition, 'default' will be used. | |
'default': 'mongo', |
This file contains hidden or 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
Warning: connection.session() MemoryStore is not | |
designed for a production environment, as it will leak | |
memory, and will not scale past a single process. | |
One of your models (Comment) doesn't have a connection. | |
Do you have a default `connection` in your `config/models.js` file? | |
Warning: connection.session() MemoryStore is not | |
designed for a production environment, as it will leak | |
memory, and will not scale past a single process. | |
One of your models (Comment) doesn't have a connection. | |
Do you have a default `connection` in your `config/models.js` file? |
This file contains hidden or 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
These are the logs for 107.170.207.198. | |
In the mean time, for alternatives and more info, check out: | |
-> [4mhttps://gist.github.com/mikermcneil/8249181[24m | |
-> [4mhttps://github.com/senchalabs/connect/wiki/Connect-3.0[24m | |
(to silence this warning, change `config/express.js`) | |
Error rendering view at :: /fortheon/source/views/hacks/recent | |
with layout located at :: /fortheon/source/views/layout | |
TypeError: /fortheon/source/views/hacks/recent.ejs:23 | |
21| | |
Post a Hack |
This file contains hidden or 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
/** | |
* Global adapter config | |
* | |
* The `adapters` configuration object lets you create different global "saved settings" | |
* that you can mix and match in your models. The `default` option indicates which | |
* "saved setting" should be used if a model doesn't have an adapter specified. | |
* | |
* Keep in mind that options you define directly in your model definitions | |
* will override these settings. | |
* |
This file contains hidden or 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
bugRepot: function(req, res){ | |
var bugObj = { | |
browserInfo: req.param('browserInfo'), | |
message: req.param('message'), | |
} | |
var smtpTransport = nodemailer.createTransport("SMTP",{ | |
service: "Mandrill", | |
auth: { |