| Provider | Singleton | Instantiable | Configurable |
|---|---|---|---|
| Constant | Yes | No | No |
| Value | Yes | No | No |
| Service | Yes | No | No |
| Factory | Yes | Yes | No |
| Decorator | Yes | No? | No |
| Provider | Yes | Yes | Yes |
| var kue = require('kue'), | |
| jobs = kue.createQueue(), | |
| util = require('util'), | |
| noop = function() {}; | |
| jobs.CLEANUP_MAX_FAILED_TIME = 30 * 24 * 60 * 60 * 1000; // 30 days | |
| jobs.CLEANUP_MAX_ACTIVE_TIME = 1 * 24 * 60 * 60 * 1000; // 1 day | |
| jobs.CLEANUP_MAX_COMPLETE_TIME = 5 * 24 * 60 * 60 * 1000; // 5 days | |
| jobs.CLEANUP_INTERVAL = 5 * 60 * 1000; // 5 minutes |
| /** | |
| * Module dependencies | |
| */ | |
| var express = require('express'); | |
| var fs = require('fs'); | |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| // img path |
| var page = new WebPage(); | |
| //spoof it as opera mini, to get the mobile page working properly | |
| page.settings.userAgent = "Opera/9.80 (J2ME/MIDP; Opera Mini/6.5.26955/27.1407; U; en) Presto/2.8.119 Version/11.10"; | |
| function doLogin(){ | |
| page.evaluate(function(){ | |
| var frm = document.getElementById("login_form"); | |
| frm.elements["email"].value = "--enter-your-email--"; |
| cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git |
| angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
| .run(function(DB) { | |
| DB.init(); | |
| }); |
#How you get Sail.js running on Openshift#
This instruction is tested with:
- Sails.js v0.9.16
- Node.js 0.10 on Openshift ( 05 May 2014)
###1) package.json
If you use the package.json build by sails new Projectname than you have to add a few fields for openshift – so the server can start you app automatically. Sails uses Grunt to build minify css/js and so on. Openshift dont have grunt installed so you have to add this also.
##Chrome Packaged Apps
Introduced at Google I/O 2012, Chrome packaged apps are a new way to develop apps that are running 'natively' within Chrome on the desktop as well as on Chrome mobile in the near future. I'm currently in the middle of a project where I develop a Chrome packaged app and in this article I would like to share my experience with the development of packaged apps.
Please note: This article should give you a basic insight of topics that I think are helpful to know for developing packaged apps. Furthermore I will give links to each topic, so you can dive deeper into that specific topic if you want to. It's not the goal of this article to act as a complete introduction to Chrome packaged apps, for a much more detailed overview of packaged apps development, please look at the official packaged app documentation.
Chrome packaged apps are applic
| 'use strict'; | |
| //npm install gulp gulp-minify-css gulp-uglify gulp-clean gulp-cleanhtml gulp-jshint gulp-strip-debug gulp-zip --save-dev | |
| var gulp = require('gulp'), | |
| clean = require('gulp-clean'), | |
| cleanhtml = require('gulp-cleanhtml'), | |
| minifycss = require('gulp-minify-css'), | |
| jshint = require('gulp-jshint'), | |
| stripdebug = require('gulp-strip-debug'), |
| Hide Splashscreen in Ionic App |