commit
188705b640
26
README.md
26
README.md
|
@ -1,26 +1,14 @@
|
||||||
TellForm 2.1.EB
|
TellForm 2.1.0
|
||||||
========
|
========
|
||||||
|
|
||||||
## EarlyBird version
|
[![Build Status](https://travis-ci.org/tellform/tellform.svg?branch=master)](https://travis-ci.org/tellform/tellform)
|
||||||
|
![Project Status](https://img.shields.io/badge/status-2.1.0-green.svg)
|
||||||
|
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3491e86eb7194308b8fc80711d736ede)](https://www.codacy.com/app/david-baldwin/tellform?utm_source=github.com&utm_medium=referral&utm_content=tellform/tellform&utm_campaign=Badge_Grade)
|
||||||
|
[![Gitter](https://badges.gitter.im/tellform/Lobby.svg)](https://gitter.im/tellform/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
|
||||||
We've made some changes and will continue to be changing this particular fork of TellForm to comply with our guidelines.
|
> An *opensource alternative to TypeForm* that can create [stunning mobile-ready forms](https://tellform.com/examples) , surveys and questionnaires.
|
||||||
|
|
||||||
Below you will find a changelog.
|
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/tellform/tellform/tree/master)
|
||||||
|
|
||||||
## Changelog
|
|
||||||
|
|
||||||
(newest to oldest)
|
|
||||||
|
|
||||||
- fix responsiveness and mobile design
|
|
||||||
- fix form styling so it isn't terrible (use Raleway, change bg color)
|
|
||||||
- disable signups (turn on disable flag, hardcode in automatic 400 if the URL contains `signup`)
|
|
||||||
- build in HTTPS support in `config/express.js`
|
|
||||||
- fix JSEP import so form appears
|
|
||||||
|
|
||||||
|
|
||||||
========
|
|
||||||
========
|
|
||||||
========
|
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml')
|
||||||
head
|
head
|
||||||
title=title
|
title=title
|
||||||
// General META
|
// General META
|
||||||
link(rel='stylesheet', type='text/css', href='https://fonts.googleapis.com/css?family=Raleway')
|
|
||||||
|
|
||||||
meta(charset='utf-8')
|
meta(charset='utf-8')
|
||||||
meta(http-equiv='Content-type', content='text/html;charset=UTF-8')
|
meta(http-equiv='Content-type', content='text/html;charset=UTF-8')
|
||||||
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
|
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
|
||||||
|
@ -37,40 +35,6 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml')
|
||||||
background: url('/static/dist/page-loader.gif') 50% 35% no-repeat rgb(249,249,249);
|
background: url('/static/dist/page-loader.gif') 50% 35% no-repeat rgb(249,249,249);
|
||||||
background-size: 50px 50px;
|
background-size: 50px 50px;
|
||||||
}
|
}
|
||||||
body {
|
|
||||||
font-family: 'Raleway' !important;
|
|
||||||
}
|
|
||||||
label.btn-default {
|
|
||||||
font-size: 14pt !important;
|
|
||||||
width: 6em !important;
|
|
||||||
padding-right: 30px;
|
|
||||||
background: none !important;
|
|
||||||
color: rgba(0,0,0,0.3) !important;
|
|
||||||
border-color: rgba(0,0,0,0.3) !important;
|
|
||||||
}
|
|
||||||
.field-directive {
|
|
||||||
margin-right: 10px !important; margin-left: 10px !important;
|
|
||||||
}
|
|
||||||
label.btn-default:hover, label.btn-default:visited, label.btn-default:active {
|
|
||||||
color: #000 !important;
|
|
||||||
background: none !important;
|
|
||||||
border-color: #000 !important;
|
|
||||||
font-weight: 400 !important;
|
|
||||||
}
|
|
||||||
.navbar { display: none !important; }
|
|
||||||
#submit_field {
|
|
||||||
height: auto !important; padding-bottom: 2% !important;
|
|
||||||
}
|
|
||||||
#submit_field > div.text-left {
|
|
||||||
background-color: #f8f8f8 !important;
|
|
||||||
color: #755 !important;
|
|
||||||
margin-top: 12px;
|
|
||||||
text-align: center !important;
|
|
||||||
}
|
|
||||||
#submit_field > button {
|
|
||||||
background-color: #755 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fav Icon
|
// Fav Icon
|
||||||
link(href='/static/modules/core/img/brand/favicon.ico', rel='shortcut icon', type='image/x-icon')
|
link(href='/static/modules/core/img/brand/favicon.ico', rel='shortcut icon', type='image/x-icon')
|
||||||
|
|
||||||
|
|
|
@ -52,4 +52,4 @@ block content
|
||||||
|
|
||||||
script(src='https://cdn.ravenjs.com/2.3.0/angular/raven.min.js')
|
script(src='https://cdn.ravenjs.com/2.3.0/angular/raven.min.js')
|
||||||
|
|
||||||
script Raven.config('https://825fefd6b4ed4a4da199c1b832ca845c@sentry.tellform.com/2').install();
|
script Raven.config('https://825fefd6b4ed4a4da199c1b832ca845c@sentry.tellform.com/2').install();
|
|
@ -32,6 +32,7 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml')
|
||||||
// Fav Icon
|
// Fav Icon
|
||||||
link(href='/static/modules/core/img/brand/favicon.ico', rel='shortcut icon', type='image/x-icon')
|
link(href='/static/modules/core/img/brand/favicon.ico', rel='shortcut icon', type='image/x-icon')
|
||||||
link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,900')
|
link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,900')
|
||||||
|
|
||||||
//Application CSS Files
|
//Application CSS Files
|
||||||
each cssFile in cssFiles
|
each cssFile in cssFiles
|
||||||
link(rel='stylesheet', href='#{cssFile}')
|
link(rel='stylesheet', href='#{cssFile}')
|
||||||
|
|
|
@ -30,7 +30,7 @@ html
|
||||||
p
|
p
|
||||||
a(href='http://${URL}')=__('VERIFICATION_EMAIL_LINK_TEXT')
|
a(href='http://${URL}')=__('VERIFICATION_EMAIL_LINK_TEXT')
|
||||||
p=__('VERIFICATION_EMAIL_PARAGRAPH_2')
|
p=__('VERIFICATION_EMAIL_PARAGRAPH_2')
|
||||||
a(href='mailto:hello@earlybird.camp')
|
a(href='mailto:team@tellform.com')
|
||||||
| team@tellform.com
|
| team@tellform.com
|
||||||
p=__('EMAIL_SIGNATURE')
|
p=__('EMAIL_SIGNATURE')
|
||||||
td(width='36')
|
td(width='36')
|
||||||
|
|
|
@ -48,18 +48,9 @@ function containsAnySupportedLanguages(preferredLanguages){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var fs = require('fs')
|
|
||||||
var https = require('https')
|
|
||||||
var pkey = fs.readFileSync('/etc/letsencrypt/live/register.earlybird.camp/privkey.pem')
|
|
||||||
var cert = fs.readFileSync('/etc/letsencrypt/live/register.earlybird.camp/fullchain.pem')
|
|
||||||
|
|
||||||
module.exports = function(db) {
|
module.exports = function(db) {
|
||||||
|
|
||||||
// Initialize express app
|
// Initialize express app
|
||||||
var app = express();
|
var app = express();
|
||||||
var serv = https.createServer({key: pkey, cert: cert}, app)
|
|
||||||
serv.listen(443)
|
|
||||||
app.get('/form', (q, s) => s.redirect('https://register.earlybird.camp/view/#!/forms/5acb2d8e541901c14fa0d907'))
|
|
||||||
var url = require('url');
|
var url = require('url');
|
||||||
|
|
||||||
// Globbing model files
|
// Globbing model files
|
||||||
|
@ -70,7 +61,7 @@ module.exports = function(db) {
|
||||||
// Setting application local variables
|
// Setting application local variables
|
||||||
app.locals.google_analytics_id = config.app.google_analytics_id;
|
app.locals.google_analytics_id = config.app.google_analytics_id;
|
||||||
app.locals.title = config.app.title;
|
app.locals.title = config.app.title;
|
||||||
app.locals.signupDisabled = true; //config.signupDisabled;
|
app.locals.signupDisabled = config.signupDisabled;
|
||||||
app.locals.description = config.app.description;
|
app.locals.description = config.app.description;
|
||||||
app.locals.keywords = config.app.keywords;
|
app.locals.keywords = config.app.keywords;
|
||||||
|
|
||||||
|
@ -117,10 +108,6 @@ module.exports = function(db) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (urlPath.indexOf('signup') > -1) {
|
|
||||||
res.send(400); return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (urlPath.indexOf('users') > -1 && urlPath.indexOf('me') > -1) {
|
if (urlPath.indexOf('users') > -1 && urlPath.indexOf('me') > -1) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
@ -380,5 +367,5 @@ module.exports = function(db) {
|
||||||
app = configureSocketIO(app, db);
|
app = configureSocketIO(app, db);
|
||||||
|
|
||||||
// Return Express server instance
|
// Return Express server instance
|
||||||
return app
|
return app;
|
||||||
};
|
};
|
||||||
|
|
|
@ -138,7 +138,7 @@ module.exports = function(grunt) {
|
||||||
dev: {
|
dev: {
|
||||||
script: 'server.js',
|
script: 'server.js',
|
||||||
options: {
|
options: {
|
||||||
//nodeArgs: ['--debug'],
|
nodeArgs: ['--debug'],
|
||||||
ext: 'js,html',
|
ext: 'js,html',
|
||||||
watch: watchFiles.serverViews.concat(watchFiles.serverJS)
|
watch: watchFiles.serverViews.concat(watchFiles.serverJS)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,354 +0,0 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var bowerArray = ['public/lib/angular/angular.min.js',
|
|
||||||
'public/lib/angular-scroll/angular-scroll.min.js',
|
|
||||||
'public/lib/angular-ui-select/dist/select.min.js',
|
|
||||||
'public/lib/v-button/dist/v-button.min.js',
|
|
||||||
'public/lib/angular-resource/angular-resource.min.js',
|
|
||||||
'public/lib/angular-ui-router/release/angular-ui-router.min.js',
|
|
||||||
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js',
|
|
||||||
'public/lib/angular-translate/angular-translate.min.js',
|
|
||||||
'public/lib/ng-file-upload/ng-file-upload-all.min.js',
|
|
||||||
'public/lib/angular-ui-date/src/date.js',
|
|
||||||
'public/lib/angular-input-stars/angular-input-stars.js',
|
|
||||||
'public/lib/jsep/build/jsep.min.js',
|
|
||||||
'public/lib/raven-js/dist/raven.min.js',
|
|
||||||
'public/lib/lodash/lodash.min.js',
|
|
||||||
'public/lib/mobile-detect/mobile-detect.js',
|
|
||||||
'public/lib/js-yaml/dist/js-yaml.js',
|
|
||||||
'public/lib/angular-sanitize/angular-sanitize.min.js'];
|
|
||||||
|
|
||||||
module.exports = function(grunt) {
|
|
||||||
require('jit-grunt')(grunt);
|
|
||||||
|
|
||||||
// Unified Watch Object
|
|
||||||
var watchFiles = {
|
|
||||||
serverViews: ['app/views/**/*.pug'],
|
|
||||||
serverJS: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js', '!app/tests/'],
|
|
||||||
|
|
||||||
clientViews: ['public/modules/**/*.html', 'public/form_modules/forms/base/**/*.html', '!public/modules/forms/base/**/*.html',],
|
|
||||||
clientJS: ['public/form_modules/**/*.js', 'public/modules/**/*.js'],
|
|
||||||
clientCSS: ['public/modules/**/*.css'],
|
|
||||||
|
|
||||||
serverTests: ['app/tests/**/*.js'],
|
|
||||||
clientTests: ['public/modules/**/tests/*.js']
|
|
||||||
};
|
|
||||||
|
|
||||||
watchFiles.allTests = watchFiles.serverTests.concat(watchFiles.clientTests);
|
|
||||||
|
|
||||||
// Project Configuration
|
|
||||||
grunt.initConfig({
|
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
|
||||||
watch: {
|
|
||||||
serverViews: {
|
|
||||||
files: watchFiles.serverViews,
|
|
||||||
options: {
|
|
||||||
livereload: true,
|
|
||||||
spawn: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
serverJS: {
|
|
||||||
files: watchFiles.serverJS,
|
|
||||||
tasks: ['newer:jshint'],
|
|
||||||
options: {
|
|
||||||
livereload: true,
|
|
||||||
spawn: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clientViews: {
|
|
||||||
files: watchFiles.clientViews,
|
|
||||||
tasks: ['html2js:main'],
|
|
||||||
options: {
|
|
||||||
livereload: true,
|
|
||||||
spawn: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clientJS: {
|
|
||||||
files: watchFiles.clientJS,
|
|
||||||
tasks: ['newer:jshint'],
|
|
||||||
options: {
|
|
||||||
livereload: true,
|
|
||||||
spawn: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clientCSS: {
|
|
||||||
files: watchFiles.clientCSS,
|
|
||||||
tasks: ['newer:csslint'],
|
|
||||||
options: {
|
|
||||||
livereload: true,
|
|
||||||
spawn: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mochaTests: {
|
|
||||||
files: watchFiles.serverTests,
|
|
||||||
tasks: ['test:server']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
jshint: {
|
|
||||||
all: {
|
|
||||||
src: watchFiles.clientJS.concat(watchFiles.serverJS),
|
|
||||||
options: {
|
|
||||||
jshintrc: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
allTests: {
|
|
||||||
src: watchFiles.allTests,
|
|
||||||
options: {
|
|
||||||
jshintrc: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
csslint: {
|
|
||||||
options: {
|
|
||||||
csslintrc: '.csslintrc'
|
|
||||||
},
|
|
||||||
all: {
|
|
||||||
src: watchFiles.clientCSS
|
|
||||||
}
|
|
||||||
},
|
|
||||||
uglify: {
|
|
||||||
productionAdmin: {
|
|
||||||
options: {
|
|
||||||
compress: true,
|
|
||||||
mangled: true
|
|
||||||
},
|
|
||||||
files: {
|
|
||||||
'public/dist/application.min.js': 'public/dist/application.js',
|
|
||||||
'public/dist/form-application.min.js': 'public/dist/form-application.js'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
productionForms: {
|
|
||||||
options: {
|
|
||||||
mangled: true,
|
|
||||||
compress: true
|
|
||||||
},
|
|
||||||
files: {
|
|
||||||
'public/dist/form-vendor.min.js': bowerArray
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cssmin: {
|
|
||||||
combine: {
|
|
||||||
files: {
|
|
||||||
'public/dist/application.min.css': '<%= applicationCSSFiles %>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
nodemon: {
|
|
||||||
dev: {
|
|
||||||
script: 'server.js',
|
|
||||||
options: {
|
|
||||||
|
|
||||||
ext: 'js,html',
|
|
||||||
watch: watchFiles.serverViews.concat(watchFiles.serverJS)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ngAnnotate: {
|
|
||||||
options:{
|
|
||||||
add: true,
|
|
||||||
remove: true
|
|
||||||
},
|
|
||||||
production: {
|
|
||||||
files: {
|
|
||||||
'public/dist/application.js': '<%= applicationJavaScriptFiles %>',
|
|
||||||
'public/dist/form-application.js': '<%= formApplicationJavaScriptFiles %>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
concurrent: {
|
|
||||||
default: ['nodemon', 'watch'],
|
|
||||||
debug: ['nodemon', 'watch'],
|
|
||||||
options: {
|
|
||||||
logConcurrentOutput: true,
|
|
||||||
limit: 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
env: {
|
|
||||||
src: '.env',
|
|
||||||
|
|
||||||
test: {
|
|
||||||
NODE_ENV: 'test',
|
|
||||||
},
|
|
||||||
secure: {
|
|
||||||
NODE_ENV: 'secure',
|
|
||||||
},
|
|
||||||
production: {
|
|
||||||
NODE_ENV: 'production',
|
|
||||||
},
|
|
||||||
dev: {
|
|
||||||
NODE_ENV: 'development',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mochaTest: {
|
|
||||||
src: watchFiles.serverTests,
|
|
||||||
options: {
|
|
||||||
reporter: 'spec',
|
|
||||||
quiet: false,
|
|
||||||
require: 'server.js',
|
|
||||||
ui: 'bdd',
|
|
||||||
debug: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
karma: {
|
|
||||||
unit: {
|
|
||||||
configFile: 'karma.conf.js',
|
|
||||||
singleRun: true
|
|
||||||
},
|
|
||||||
debug: {
|
|
||||||
configFile: 'karma.conf.js',
|
|
||||||
browserConsoleLogOptions: {
|
|
||||||
level: 'log',
|
|
||||||
terminal: true
|
|
||||||
},
|
|
||||||
singleRun: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
protractor: {
|
|
||||||
options: {
|
|
||||||
configFile: 'protractor.conf.js',
|
|
||||||
keepAlive: true,
|
|
||||||
noColor: false
|
|
||||||
},
|
|
||||||
e2e: {
|
|
||||||
options: {
|
|
||||||
args: {} // Target-specific arguments
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mocha_istanbul: {
|
|
||||||
coverage: {
|
|
||||||
src: watchFiles.allTests, // a folder works nicely
|
|
||||||
options: {
|
|
||||||
mask: '*.test.js',
|
|
||||||
require: ['server.js']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
coverageClient: {
|
|
||||||
src: watchFiles.clientTests, // specifying file patterns works as well
|
|
||||||
options: {
|
|
||||||
coverageFolder: 'coverageClient',
|
|
||||||
mask: '*.test.js',
|
|
||||||
require: ['server.js']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
coverageServer: {
|
|
||||||
src: watchFiles.serverTests,
|
|
||||||
options: {
|
|
||||||
coverageFolder: 'coverageServer',
|
|
||||||
mask: '*.test.js',
|
|
||||||
require: ['server.js']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
coveralls: {
|
|
||||||
src: watchFiles.allTests, // multiple folders also works
|
|
||||||
options: {
|
|
||||||
require: ['server.js'],
|
|
||||||
coverage: true, // this will make the grunt.event.on('coverage') event listener to be triggered
|
|
||||||
root: './lib', // define where the cover task should consider the root of libraries that are covered by tests
|
|
||||||
reportFormats: ['cobertura','lcovonly']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
istanbul_check_coverage: {
|
|
||||||
default: {
|
|
||||||
options: {
|
|
||||||
coverageFolder: 'coverage*', // will check both coverage folders and merge the coverage results
|
|
||||||
check: {
|
|
||||||
lines: 80,
|
|
||||||
statements: 80
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
html2js: {
|
|
||||||
options: {
|
|
||||||
base: 'public',
|
|
||||||
watch: true,
|
|
||||||
singleModule: true,
|
|
||||||
useStrict: true,
|
|
||||||
htmlmin: {
|
|
||||||
collapseBooleanAttributes: true,
|
|
||||||
collapseWhitespace: true,
|
|
||||||
removeAttributeQuotes: true,
|
|
||||||
removeComments: true,
|
|
||||||
removeEmptyAttributes: true,
|
|
||||||
removeRedundantAttributes: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
forms: {
|
|
||||||
options: {
|
|
||||||
module: 'TellForm-Form.form_templates'
|
|
||||||
},
|
|
||||||
src: ['public/form_modules/**/views/**.html', 'public/form_modules/**/views/**/*.html'],
|
|
||||||
dest: 'public/dist/form_populate_template_cache.js'
|
|
||||||
},
|
|
||||||
main: {
|
|
||||||
options: {
|
|
||||||
module: 'TellForm.templates'
|
|
||||||
},
|
|
||||||
src: ['public/modules/**/views/**.html', 'public/modules/**/views/**/*.html', 'public/form_modules/forms/base/**/*.html', '!public/modules/forms/base/**/*.html'],
|
|
||||||
dest: 'public/dist/populate_template_cache.js'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
execute: {
|
|
||||||
target: {
|
|
||||||
src: ['./scripts/setup.js']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
grunt.event.on('coverage', function(lcov, done){
|
|
||||||
var coveralls = require('coveralls');
|
|
||||||
coveralls.handleInput(lcov, function(err){
|
|
||||||
if (err) {
|
|
||||||
grunt.log.error('Failed to submit lcov file to coveralls: ' + err);
|
|
||||||
return done(err);
|
|
||||||
}
|
|
||||||
grunt.verbose.ok('Successfully submitted lcov file to coveralls');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Making grunt default to force in order not to break the project.
|
|
||||||
grunt.option('force', true);
|
|
||||||
|
|
||||||
// A Task for loading the configuration object
|
|
||||||
grunt.task.registerTask('loadConfig', 'Task that loads the config into a grunt option.', function() {
|
|
||||||
require('./config/init')();
|
|
||||||
var config = require('./config/config');
|
|
||||||
grunt.config.set('applicationJavaScriptFiles', config.assets.js);
|
|
||||||
grunt.config.set('formApplicationJavaScriptFiles', config.assets.form_js);
|
|
||||||
grunt.config.set('applicationCSSFiles', config.assets.css);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Code coverage tasks.
|
|
||||||
grunt.registerTask('coveralls', ['env:test','mocha_istanbul:coveralls']);
|
|
||||||
grunt.registerTask('coverage', ['env:test', 'mocha_istanbul:coverage']);
|
|
||||||
grunt.registerTask('coverage:client', ['env:test', 'mocha_istanbul:coverageClient']);
|
|
||||||
grunt.registerTask('coverage:server', ['env:test', 'mocha_istanbul:coverageServer']);
|
|
||||||
|
|
||||||
// Default task(s).
|
|
||||||
grunt.registerTask('default', ['lint', 'loadConfig', 'ngAnnotate', 'uglify', 'html2js:main', 'html2js:forms', 'env', 'concurrent:default']);
|
|
||||||
grunt.registerTask('dev', ['lint', 'html2js:main', 'html2js:forms', 'env:dev', 'concurrent:default']);
|
|
||||||
|
|
||||||
// Debug task.
|
|
||||||
grunt.registerTask('debug', ['lint', 'html2js:main', 'html2js:forms', 'concurrent:debug']);
|
|
||||||
|
|
||||||
// Lint task(s).
|
|
||||||
grunt.registerTask('lint', ['jshint', 'csslint', 'i18nlint:client', 'i18nlint:server']);
|
|
||||||
grunt.registerTask('lint:tests', ['jshint:allTests']);
|
|
||||||
|
|
||||||
// Build task(s).
|
|
||||||
grunt.registerTask('build', ['lint', 'loadConfig', 'cssmin', 'ngAnnotate', 'uglify', 'html2js:main', 'html2js:forms']);
|
|
||||||
|
|
||||||
//Setup task(s).
|
|
||||||
grunt.registerTask('setup', ['execute']);
|
|
||||||
|
|
||||||
// Test task(s).
|
|
||||||
grunt.registerTask('test', ['lint:tests', 'test:server', 'test:client']);
|
|
||||||
grunt.registerTask('test:server', ['lint:tests', 'env:test', 'mochaTest']);
|
|
||||||
grunt.registerTask('test:client', ['lint:tests', 'html2js:main', 'html2js:forms', 'env:test', 'karma:unit']);
|
|
||||||
|
|
||||||
grunt.registerTask('testdebug', ['env:test', 'karma:debug']);
|
|
||||||
};
|
|
212
package-lock.json
generated
212
package-lock.json
generated
|
@ -505,6 +505,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz",
|
||||||
"integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE="
|
"integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE="
|
||||||
},
|
},
|
||||||
|
"bluebird": {
|
||||||
|
"version": "2.10.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz",
|
||||||
|
"integrity": "sha1-AkpVFylTCIV/FPkfEQb8O1VfRGs="
|
||||||
|
},
|
||||||
"body-parser": {
|
"body-parser": {
|
||||||
"version": "1.14.2",
|
"version": "1.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz",
|
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz",
|
||||||
|
@ -3861,6 +3866,75 @@
|
||||||
"integrity": "sha1-24qsR/+Ap9+CtMgsEm/olwhwYm8=",
|
"integrity": "sha1-24qsR/+Ap9+CtMgsEm/olwhwYm8=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"email-verification": {
|
||||||
|
"version": "github:tellform/node-email-verification#8b179f34e0943c389b2058c9ec1e6d2135a72857",
|
||||||
|
"requires": {
|
||||||
|
"mongoose": "3.8.40",
|
||||||
|
"nodemailer": "4.0.1",
|
||||||
|
"rand-token": "0.2.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"bson": {
|
||||||
|
"version": "0.2.22",
|
||||||
|
"resolved": "https://registry.npmjs.org/bson/-/bson-0.2.22.tgz",
|
||||||
|
"integrity": "sha1-/NoQPybQwHTVpS1Qkn24D9ArSzk=",
|
||||||
|
"requires": {
|
||||||
|
"nan": "1.8.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mongodb": {
|
||||||
|
"version": "1.4.38",
|
||||||
|
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-1.4.38.tgz",
|
||||||
|
"integrity": "sha1-jP/WGBAK86RkiplUmL/Py07Yq9I=",
|
||||||
|
"requires": {
|
||||||
|
"bson": "0.2.22",
|
||||||
|
"kerberos": "0.0.11",
|
||||||
|
"readable-stream": "2.3.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mongoose": {
|
||||||
|
"version": "3.8.40",
|
||||||
|
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-3.8.40.tgz",
|
||||||
|
"integrity": "sha1-Ay9bpVWCSXVZqHwfP0s5WcJkBqc=",
|
||||||
|
"requires": {
|
||||||
|
"hooks": "0.2.1",
|
||||||
|
"mongodb": "1.4.38",
|
||||||
|
"mpath": "0.1.1",
|
||||||
|
"mpromise": "0.4.3",
|
||||||
|
"mquery": "1.10.0",
|
||||||
|
"ms": "0.1.0",
|
||||||
|
"muri": "1.1.0",
|
||||||
|
"regexp-clone": "0.0.1",
|
||||||
|
"sliced": "0.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ms": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-0.1.0.tgz",
|
||||||
|
"integrity": "sha1-8h+sSQ2vHXZn/RgP6QdzicyUQrI="
|
||||||
|
},
|
||||||
|
"nan": {
|
||||||
|
"version": "1.8.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/nan/-/nan-1.8.4.tgz",
|
||||||
|
"integrity": "sha1-PHa1OC6rM+RLdY0oE8qdkuk0LzQ="
|
||||||
|
},
|
||||||
|
"readable-stream": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
|
||||||
|
"optional": true,
|
||||||
|
"requires": {
|
||||||
|
"core-util-is": "1.0.2",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"isarray": "1.0.0",
|
||||||
|
"process-nextick-args": "1.0.7",
|
||||||
|
"safe-buffer": "5.1.1",
|
||||||
|
"string_decoder": "1.0.3",
|
||||||
|
"util-deprecate": "1.0.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"encodeurl": {
|
"encodeurl": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
|
||||||
|
@ -6187,6 +6261,14 @@
|
||||||
"jade": "1.11.0"
|
"jade": "1.11.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"grunt-i18nlint": {
|
||||||
|
"version": "github:jwarby/grunt-i18nlint#6b398f775c8ca881a16f45a3cb94c5b79ee11e20",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "1.1.3",
|
||||||
|
"i18n-lint": "git://github.com/jwarby/i18n-lint.git#0a06373c0d880047ad680239c103d60ed414efc1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"grunt-karma": {
|
"grunt-karma": {
|
||||||
"version": "0.12.2",
|
"version": "0.12.2",
|
||||||
"resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-0.12.2.tgz",
|
"resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-0.12.2.tgz",
|
||||||
|
@ -6613,6 +6695,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz",
|
||||||
"integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk="
|
"integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk="
|
||||||
},
|
},
|
||||||
|
"hooks": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/hooks/-/hooks-0.2.1.tgz",
|
||||||
|
"integrity": "sha1-D1kbGzRL3LPfWXc/Yvu6+Fv0Aos="
|
||||||
|
},
|
||||||
"hooks-fixed": {
|
"hooks-fixed": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-1.1.0.tgz",
|
||||||
|
@ -6767,11 +6854,6 @@
|
||||||
"sshpk": "1.13.1"
|
"sshpk": "1.13.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"https": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz",
|
|
||||||
"integrity": "sha1-PDfHrhqO65ZpBKKtHpdaGUt+06Q="
|
|
||||||
},
|
|
||||||
"https-proxy-agent": {
|
"https-proxy-agent": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
|
||||||
|
@ -6807,6 +6889,48 @@
|
||||||
"sprintf-js": "1.1.1"
|
"sprintf-js": "1.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"i18n-lint": {
|
||||||
|
"version": "git://github.com/jwarby/i18n-lint.git#0a06373c0d880047ad680239c103d60ed414efc1",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "1.1.3",
|
||||||
|
"commander": "2.8.1",
|
||||||
|
"glob": "5.0.15",
|
||||||
|
"htmlparser2": "3.8.3",
|
||||||
|
"lodash": "3.10.1",
|
||||||
|
"node.extend": "1.1.6"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"glob": {
|
||||||
|
"version": "5.0.15",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
|
||||||
|
"integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"inflight": "1.0.6",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"minimatch": "3.0.4",
|
||||||
|
"once": "1.4.0",
|
||||||
|
"path-is-absolute": "1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lodash": {
|
||||||
|
"version": "3.10.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
||||||
|
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "1.1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"iconv-lite": {
|
"iconv-lite": {
|
||||||
"version": "0.2.11",
|
"version": "0.2.11",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
|
||||||
|
@ -6991,6 +7115,12 @@
|
||||||
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz",
|
||||||
"integrity": "sha1-X6eM8wG4JceKvDBC2BJyMEnqI8c="
|
"integrity": "sha1-X6eM8wG4JceKvDBC2BJyMEnqI8c="
|
||||||
},
|
},
|
||||||
|
"is": {
|
||||||
|
"version": "3.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz",
|
||||||
|
"integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"is-arrayish": {
|
"is-arrayish": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||||
|
@ -7805,6 +7935,23 @@
|
||||||
"phantomjs-prebuilt": "2.1.15"
|
"phantomjs-prebuilt": "2.1.15"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"kerberos": {
|
||||||
|
"version": "0.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/kerberos/-/kerberos-0.0.11.tgz",
|
||||||
|
"integrity": "sha1-yymJHCHCKsGV8xQLl90SIE/qfcI=",
|
||||||
|
"optional": true,
|
||||||
|
"requires": {
|
||||||
|
"nan": "1.8.4"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"nan": {
|
||||||
|
"version": "1.8.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/nan/-/nan-1.8.4.tgz",
|
||||||
|
"integrity": "sha1-PHa1OC6rM+RLdY0oE8qdkuk0LzQ=",
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"kew": {
|
"kew": {
|
||||||
"version": "0.7.0",
|
"version": "0.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
|
||||||
|
@ -8875,6 +9022,42 @@
|
||||||
"resolved": "https://registry.npmjs.org/mout/-/mout-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/mout/-/mout-1.1.0.tgz",
|
||||||
"integrity": "sha512-XsP0vf4As6BfqglxZqbqQ8SR6KQot2AgxvR0gG+WtUkf90vUXchMOZQtPf/Hml1rEffJupqL/tIrU6EYhsUQjw=="
|
"integrity": "sha512-XsP0vf4As6BfqglxZqbqQ8SR6KQot2AgxvR0gG+WtUkf90vUXchMOZQtPf/Hml1rEffJupqL/tIrU6EYhsUQjw=="
|
||||||
},
|
},
|
||||||
|
"mpath": {
|
||||||
|
"version": "0.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.1.1.tgz",
|
||||||
|
"integrity": "sha1-I9qFK3wjLuCX9HWdKcDunNItXkY="
|
||||||
|
},
|
||||||
|
"mpromise": {
|
||||||
|
"version": "0.4.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/mpromise/-/mpromise-0.4.3.tgz",
|
||||||
|
"integrity": "sha1-7cR6daKhd7DpOCc121Lb7DgIzDM="
|
||||||
|
},
|
||||||
|
"mquery": {
|
||||||
|
"version": "1.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mquery/-/mquery-1.10.0.tgz",
|
||||||
|
"integrity": "sha1-hgPwKwtSTResBTmoWZYSTuF7fLM=",
|
||||||
|
"requires": {
|
||||||
|
"bluebird": "2.10.2",
|
||||||
|
"debug": "2.2.0",
|
||||||
|
"regexp-clone": "0.0.1",
|
||||||
|
"sliced": "0.0.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||||
|
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
|
||||||
|
"requires": {
|
||||||
|
"ms": "0.7.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ms": {
|
||||||
|
"version": "0.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||||
|
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
@ -9047,6 +9230,15 @@
|
||||||
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz",
|
||||||
"integrity": "sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA="
|
"integrity": "sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA="
|
||||||
},
|
},
|
||||||
|
"node.extend": {
|
||||||
|
"version": "1.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.6.tgz",
|
||||||
|
"integrity": "sha1-p7iCyC1sk6SGOlUEvV3o7IYli5Y=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is": "3.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nodemailer": {
|
"nodemailer": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-4.0.1.tgz",
|
||||||
|
@ -10557,6 +10749,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
|
||||||
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
|
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
|
||||||
},
|
},
|
||||||
|
"rand-token": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/rand-token/-/rand-token-0.2.1.tgz",
|
||||||
|
"integrity": "sha1-3GfIEjMGyRInstw/W+pz0wE3YiY="
|
||||||
|
},
|
||||||
"random-js": {
|
"random-js": {
|
||||||
"version": "1.0.8",
|
"version": "1.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/random-js/-/random-js-1.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/random-js/-/random-js-1.0.8.tgz",
|
||||||
|
@ -11173,6 +11370,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz",
|
||||||
"integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA="
|
"integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA="
|
||||||
},
|
},
|
||||||
|
"sliced": {
|
||||||
|
"version": "0.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz",
|
||||||
|
"integrity": "sha1-XtwETKTrb3gW1Qui/GPiXY/kcH8="
|
||||||
|
},
|
||||||
"smart-buffer": {
|
"smart-buffer": {
|
||||||
"version": "1.1.15",
|
"version": "1.1.15",
|
||||||
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
|
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
"grunt-html2js": "~0.3.5",
|
"grunt-html2js": "~0.3.5",
|
||||||
"grunt-ng-annotate": "~1.0.1",
|
"grunt-ng-annotate": "~1.0.1",
|
||||||
"helmet": "3.5.0",
|
"helmet": "3.5.0",
|
||||||
"https": "^1.0.0",
|
|
||||||
"i18n": "^0.8.3",
|
"i18n": "^0.8.3",
|
||||||
"jit-grunt": "^0.9.1",
|
"jit-grunt": "^0.9.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
|
|
18
server.js
18
server.js
|
@ -1,10 +1,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
/**
|
/**
|
||||||
* Module dependencies.
|
* Module dependencies.
|
||||||
*/
|
*/
|
||||||
var fs = require('fs')
|
|
||||||
var https = require('https')
|
|
||||||
|
|
||||||
require('dotenv').config({path: './.env'});
|
require('dotenv').config({path: './.env'});
|
||||||
|
|
||||||
|
@ -12,9 +9,6 @@ if(!process.env.NODE_ENV){
|
||||||
process.env.NODE_ENV = 'development';
|
process.env.NODE_ENV = 'development';
|
||||||
}
|
}
|
||||||
|
|
||||||
var pkey = fs.readFileSync('/etc/letsencrypt/live/register.earlybird.camp/privkey.pem')
|
|
||||||
var cert = fs.readFileSync('/etc/letsencrypt/live/register.earlybird.camp/fullchain.pem')
|
|
||||||
|
|
||||||
|
|
||||||
require('events').EventEmitter.prototype._maxListeners = 0;
|
require('events').EventEmitter.prototype._maxListeners = 0;
|
||||||
|
|
||||||
|
@ -41,7 +35,7 @@ mongoose.connection.on('error', function (err) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const smtpTransport = nodemailer.createTransport(config.mailer.options);
|
const smtpTransport = nodemailer.createTransport(config.mailer.options);
|
||||||
console.log("GOT PAST MONGOOSE")
|
|
||||||
// verify connection configuration on startup
|
// verify connection configuration on startup
|
||||||
smtpTransport.verify(function(error, success) {
|
smtpTransport.verify(function(error, success) {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -67,16 +61,10 @@ if (process.env.CREATE_ADMIN_ACCOUNT === 'TRUE') {
|
||||||
|
|
||||||
// Bootstrap passport config
|
// Bootstrap passport config
|
||||||
require('./config/passport')();
|
require('./config/passport')();
|
||||||
console.log("Got past passport!")
|
|
||||||
// Start the app by listening on <port>
|
// Start the app by listening on <port>
|
||||||
app.listen(80, () => console.log("Listening"));
|
app.listen(config.port);
|
||||||
console.log("Got past Listen1")
|
|
||||||
|
|
||||||
//https.createServer({key: pkey, cert: cert}, app).listen(config.port, () => {
|
|
||||||
// console.log('Listening on 443')
|
|
||||||
//})
|
|
||||||
|
|
||||||
console.log("GOT PAST LISTEN");
|
|
||||||
// Expose app
|
// Expose app
|
||||||
exports = module.exports = app;
|
exports = module.exports = app;
|
||||||
|
|
||||||
|
|
11
test.js
11
test.js
|
@ -1,11 +0,0 @@
|
||||||
var fs = require('fs')
|
|
||||||
var pkey = fs.readFileSync('/etc/letsencrypt/live/register.earlybird.camp/privkey.pem')
|
|
||||||
var cert = fs.readFileSync('/etc/letsencrypt/live/register.earlybird.camp/fullchain.pem')
|
|
||||||
|
|
||||||
var express = require('express')
|
|
||||||
var app = express()
|
|
||||||
app.get('/', (q, s) => s.send('hello'))
|
|
||||||
app.listen(80)
|
|
||||||
|
|
||||||
var https = require('https')
|
|
||||||
https.createServer({key: pkey, cert: cert}, app).listen(443)
|
|
Loading…
Reference in a new issue