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 oauthModule = require('./oauth2') | |
, url = require('url') | |
, crypto = require('crypto'); | |
var mailru = module.exports = | |
oauthModule.submodule('mailru') | |
.configurable({ | |
display: 'set to "mobile" if you want users to see a mobile optimized version of the auth page', | |
scope: 'specify types of access: See http://api.mail.ru/docs/guides/restapi/#permissions' | |
}) |
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
/* | |
A little node.js server for testing html5 ajax file uploads. | |
It serves up the current directory and receives uploads at /upload. | |
This is for use with xhr.send(file) where the entire request body is the file. | |
It just pauses one second between chunks so that client-side progress events | |
get a chance to fire. On my laptop it looks like the maximum chunk size is | |
around 40K, so you would still need images in the range of hundreds of kilobytes | |
to really be able to test it. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/** | |
* Default session configuration | |
* Inject app and express reference | |
* | |
* Created by init script | |
* App based on TrinteJS MVC framework | |
* TrinteJS homepage http://www.trintejs.com | |
**/ | |
var config = require('./configuration'); |
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
/** | |
* Local Authorization manager | |
* | |
* | |
* Created by init script | |
* App based on TrinteJS MVC framework | |
* TrinteJS homepage http://www.trintejs.com | |
**/ | |
var auth = require( 'trinte-auth' ); |
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
/** | |
* User Model Helper | |
* | |
* Created by init script | |
* App based on TrinteJS MVC framework | |
* TrinteJS homepage http://www.trintejs.com | |
**/ | |
var crypto = require('crypto'); | |
var checkEmail = /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i; |
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
/** | |
* Upload manager | |
* | |
* | |
* Created by init script | |
* App based on TrinteJS MVC framework | |
* TrinteJS homepage http://www.trintejs.com | |
**/ | |
var Uploader = require('express-uploader'); | |
var defaultOptions = { |
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
/** | |
* Recaptcha builder | |
* | |
* | |
* Created by init script | |
* App based on TrinteJS MVC framework | |
* TrinteJS homepage http://www.trintejs.com | |
**/ | |
var Recaptcha = require('recaptcha').Recaptcha; | |
var config = require("../configuration"); |
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
/** | |
* Mail manager | |
* | |
* | |
* Created by init script | |
* App based on TrinteJS MVC framework | |
* TrinteJS homepage http://www.trintejs.com | |
**/ | |
var nodemailer = require("nodemailer"); | |
var config = require("../configuration"); |
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
/** | |
* Shopping Cart manager | |
* | |
* | |
* Created by init script | |
* App based on TrinteJS MVC framework | |
* TrinteJS homepage http://www.trintejs.com | |
**/ | |
exports.addProductToCart = function addProductToCart() { |
OlderNewer