Merge branch 'master' of github.com:tellform/tellform
This commit is contained in:
commit
d132133d67
13
README.md
13
README.md
|
@ -4,7 +4,7 @@ TellForm 2.1.0
|
|||
[![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/tellform.svg)](https://gitter.im/tellform/tellform?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[![Gitter](https://badges.gitter.im/tellform/Lobby.svg)](https://gitter.im/tellform/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
> An *opensource alternative to TypeForm* that can create [stunning mobile-ready forms](https://tellform.com/examples) , surveys and questionnaires.
|
||||
|
||||
|
@ -119,14 +119,7 @@ Your application should run on port 3000 or the port you specified in your .env
|
|||
|
||||
To deploy with docker, first install docker [here](https://docs.docker.com/engine/installation/).
|
||||
|
||||
Then run these commands
|
||||
|
||||
```
|
||||
$ docker run -p 27017:27017 -d --name some-mongo mongo
|
||||
$ docker run -p 127.0.0.1:6379:6379 -d --name some-redis redis
|
||||
$ docker run --rm -p 3000:3000 --link some-redis:redis-db --link some-mongo:db -e "SUBDOMAINS_DISABLED=TRUE" -e "DISABLE_CLUSTER_MODE=TRUE" -e "MAILER_EMAIL_ID=<YourEmailAPI_ID>" -e "MAILER_FROM=<noreply@yourdomain.com>" -e "MAILER_SERVICE_PROVIDER=<YourEmailAPIProvider>" -e "MAILER_PASSWORD=<YourAPIKey>" -e "BASE_URL=localhost" -p 80:80 tellform/development
|
||||
```
|
||||
|
||||
Then see this page [here](https://tellform.com/install_docker) for commands on how to deploy your own local TellForm instance.
|
||||
|
||||
## Testing Your Application
|
||||
You can run the full test suite included with TellForm with the test task:
|
||||
|
@ -201,7 +194,7 @@ TellForm's configuration is done with environment variables. To set an option fo
|
|||
|
||||
## Where to get help
|
||||
|
||||
[Gitter Chat](https://gitter.im/tellform/tellform)
|
||||
[Gitter Chat](https://gitter.im/tellform/Lobby)
|
||||
|
||||
[Official Twitter](https://twitter.com/tellform_real)
|
||||
|
||||
|
|
7
app.json
7
app.json
|
@ -28,5 +28,10 @@
|
|||
"description": "Which mail service/API you will be using (i.e. SparkPost, Mandrill, etc)",
|
||||
"value": "SendGrid"
|
||||
}
|
||||
}
|
||||
},
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "https://github.com/heroku/heroku-buildpack-nodejs#v111"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -9,19 +9,7 @@ var mongoose = require('mongoose'),
|
|||
config = require('../../config/config'),
|
||||
timeStampPlugin = require('../libs/timestamp.server.plugin'),
|
||||
path = require('path'),
|
||||
querystring = require('querystring'),
|
||||
nodemailer = require('nodemailer');
|
||||
|
||||
var smtpTransport = nodemailer.createTransport(config.mailer.options);
|
||||
|
||||
// verify connection configuration on startup
|
||||
smtpTransport.verify(function(error, success) {
|
||||
if (error) {
|
||||
console.log('Your mail configuration is incorrect', error);
|
||||
} else {
|
||||
console.log('Mail server is ready to take our messages');
|
||||
}
|
||||
});
|
||||
querystring = require('querystring');
|
||||
|
||||
/**
|
||||
* A Validation function for local strategy properties
|
||||
|
|
|
@ -79,9 +79,9 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml')
|
|||
//Socket.io Client Dependency
|
||||
script(src='/static/lib/socket.io-client/dist/socket.io.min.js')
|
||||
script(src='/static/lib/jquery-ui/jquery-ui.js', type='text/javascript')
|
||||
script(src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', integrity='sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa', crossorigin='anonymous')
|
||||
|
||||
//Minified Bower Dependencies
|
||||
script(src='/static/lib/angular/angular.min.js')
|
||||
script(src='/static/dist/vendor.min.js')
|
||||
script(src='/static/lib/angular-ui-date/src/date.js', type='text/javascript')
|
||||
|
||||
|
|
195
package-lock.json
generated
195
package-lock.json
generated
|
@ -442,22 +442,6 @@
|
|||
"integrity": "sha1-PzQU84AyF0O/wQQvmoP/HVgk1GQ=",
|
||||
"dev": true
|
||||
},
|
||||
"bcrypt": {
|
||||
"version": "0.8.7",
|
||||
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-0.8.7.tgz",
|
||||
"integrity": "sha1-vDh1qa/Qp7LNIxpqfyGKXOFWsJM=",
|
||||
"requires": {
|
||||
"bindings": "1.2.1",
|
||||
"nan": "2.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"nan": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.3.5.tgz",
|
||||
"integrity": "sha1-gioNwmYpDOTNOhIoLKPn42Rmigg="
|
||||
}
|
||||
}
|
||||
},
|
||||
"bcrypt-pbkdf": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
|
||||
|
@ -485,11 +469,6 @@
|
|||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz",
|
||||
"integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA="
|
||||
},
|
||||
"bindings": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
|
||||
"integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE="
|
||||
},
|
||||
"bl": {
|
||||
"version": "0.9.5",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz",
|
||||
|
@ -2736,11 +2715,6 @@
|
|||
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
||||
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8="
|
||||
},
|
||||
"byt": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/byt/-/byt-0.1.0.tgz",
|
||||
"integrity": "sha1-tyVTl3uMTciQ0mL9XiDzMAOdFUs="
|
||||
},
|
||||
"bytes": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz",
|
||||
|
@ -3150,13 +3124,10 @@
|
|||
}
|
||||
},
|
||||
"connect-mongo": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-0.8.2.tgz",
|
||||
"integrity": "sha1-ySh47sDFpaZiW3mgwhTzf4YfxuA=",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-2.0.0.tgz",
|
||||
"integrity": "sha512-2Nj5d4XO55AXSy1GOXDZteSEEUObGm/kvJaXyEQCa8cCHsCiZH+V/+sjk3b+khc4V8oyVi34rCtUxor4TfETLA==",
|
||||
"requires": {
|
||||
"debug": "3.1.0",
|
||||
"depd": "1.1.1",
|
||||
"lodash": "4.17.4",
|
||||
"mongodb": "2.0.55"
|
||||
}
|
||||
},
|
||||
|
@ -4086,6 +4057,36 @@
|
|||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
|
||||
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY="
|
||||
},
|
||||
"envfile": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/envfile/-/envfile-2.1.1.tgz",
|
||||
"integrity": "sha1-jlrmacHyRZ5YkJWdn4obHAXmj50=",
|
||||
"requires": {
|
||||
"ambi": "2.5.0",
|
||||
"eachr": "3.2.0",
|
||||
"editions": "1.3.3",
|
||||
"typechecker": "4.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eachr": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eachr/-/eachr-3.2.0.tgz",
|
||||
"integrity": "sha1-LDXkPqCGUW95l8+At6pk1VpKRIQ=",
|
||||
"requires": {
|
||||
"editions": "1.3.3",
|
||||
"typechecker": "4.4.1"
|
||||
}
|
||||
},
|
||||
"typechecker": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/typechecker/-/typechecker-4.4.1.tgz",
|
||||
"integrity": "sha1-+XuV9RsDhBchLWd9RaNz7nvO1+Y=",
|
||||
"requires": {
|
||||
"editions": "1.3.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"error-ex": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
|
||||
|
@ -6260,14 +6261,6 @@
|
|||
"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": {
|
||||
"version": "0.12.2",
|
||||
"resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-0.12.2.tgz",
|
||||
|
@ -6888,48 +6881,6 @@
|
|||
"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": {
|
||||
"version": "0.2.11",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
|
||||
|
@ -7114,12 +7065,6 @@
|
|||
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz",
|
||||
"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": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||
|
@ -7662,6 +7607,7 @@
|
|||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
||||
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "4.1.11"
|
||||
},
|
||||
|
@ -7670,6 +7616,7 @@
|
|||
"version": "4.1.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
|
@ -8268,11 +8215,6 @@
|
|||
"integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=",
|
||||
"dev": true
|
||||
},
|
||||
"log-rotate": {
|
||||
"version": "0.2.7",
|
||||
"resolved": "https://registry.npmjs.org/log-rotate/-/log-rotate-0.2.7.tgz",
|
||||
"integrity": "sha1-qttkJZ7qSeVmiEI0LIZNCxQujC0="
|
||||
},
|
||||
"log4js": {
|
||||
"version": "0.6.38",
|
||||
"resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz",
|
||||
|
@ -8315,27 +8257,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"logrotate-stream": {
|
||||
"version": "0.2.5",
|
||||
"resolved": "https://registry.npmjs.org/logrotate-stream/-/logrotate-stream-0.2.5.tgz",
|
||||
"integrity": "sha1-/dQueYKn7i64a1X18j3L/8ZuaZA=",
|
||||
"requires": {
|
||||
"byt": "0.1.0",
|
||||
"log-rotate": "0.2.7",
|
||||
"optimist": "0.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"optimist": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
||||
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
|
||||
"requires": {
|
||||
"minimist": "0.0.8",
|
||||
"wordwrap": "0.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"longest": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
|
||||
|
@ -9253,15 +9174,6 @@
|
|||
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz",
|
||||
"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": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-4.0.1.tgz",
|
||||
|
@ -12566,9 +12478,6 @@
|
|||
"string-width": "1.0.2"
|
||||
}
|
||||
},
|
||||
"wildcard-subdomains": {
|
||||
"version": "github:tellform/wildcard-subdomains#af33bb3e040da9f11387f920f3801c4d080c0423"
|
||||
},
|
||||
"window-size": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
|
||||
|
@ -12599,40 +12508,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"winston-logrotate": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/winston-logrotate/-/winston-logrotate-1.3.0.tgz",
|
||||
"integrity": "sha1-Sy9cLqrvSS9bdcccpzd48wXI/4A=",
|
||||
"requires": {
|
||||
"bluebird": "2.9.30",
|
||||
"fs-extra": "0.24.0",
|
||||
"logrotate-stream": "0.2.5",
|
||||
"winston": "2.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"bluebird": {
|
||||
"version": "2.9.30",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.30.tgz",
|
||||
"integrity": "sha1-7dqHXsmq0fKc8fVtboL7qysN9VY="
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "0.24.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.24.0.tgz",
|
||||
"integrity": "sha1-1OQ0KpZnXLeEZjOmCZJJMytTmVI=",
|
||||
"requires": {
|
||||
"graceful-fs": "4.1.11",
|
||||
"jsonfile": "2.4.0",
|
||||
"path-is-absolute": "1.0.1",
|
||||
"rimraf": "2.2.8"
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.1.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
|
||||
}
|
||||
}
|
||||
},
|
||||
"wiredep": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wiredep/-/wiredep-4.0.0.tgz",
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"generate": "all-contributors generate",
|
||||
"start": "grunt",
|
||||
"test": "grunt test",
|
||||
"postinstall": "bower install --config.interactive=false; grunt build;",
|
||||
"postinstall": "bower install --config.interactive=false",
|
||||
"init": "node scripts/setup.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -31,12 +31,13 @@
|
|||
"chalk": "^1.1.3",
|
||||
"compression": "~1.6.0",
|
||||
"connect": "^3.4.1",
|
||||
"connect-mongo": "~0.8.2",
|
||||
"connect-mongo": "^2.0.0",
|
||||
"consolidate": "~0.14.5",
|
||||
"cookie-parser": "~1.4.0",
|
||||
"deep-diff": "^0.3.4",
|
||||
"dotenv": "^2.0.0",
|
||||
"email-verification": "github:tellform/node-email-verification",
|
||||
"envfile": "^2.1.1",
|
||||
"express": "~4.13.3",
|
||||
"express-session": "~1.12.1",
|
||||
"glob": "^7.0.3",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
var config = require('../config/config'),
|
||||
var config = require('../config/config'),
|
||||
mongoose = require('mongoose'),
|
||||
inquirer = require('inquirer'),
|
||||
envfile = require('envfile'),
|
||||
|
|
13
server.js
13
server.js
|
@ -14,7 +14,8 @@ require('events').EventEmitter.prototype._maxListeners = 0;
|
|||
|
||||
var config = require('./config/config'),
|
||||
mongoose = require('mongoose'),
|
||||
chalk = require('chalk');
|
||||
chalk = require('chalk'),
|
||||
nodemailer = require('nodemailer');
|
||||
|
||||
/**
|
||||
* Main application entry file.
|
||||
|
@ -33,6 +34,16 @@ mongoose.connection.on('error', function (err) {
|
|||
process.exit(-1);
|
||||
});
|
||||
|
||||
const smtpTransport = nodemailer.createTransport(config.mailer.options);
|
||||
|
||||
// verify connection configuration on startup
|
||||
smtpTransport.verify(function(error, success) {
|
||||
if (error) {
|
||||
console.error(chalk.red('Your mail configuration is incorrect: ' + error));
|
||||
process.exit(-1);
|
||||
}
|
||||
});
|
||||
|
||||
// Init the express application
|
||||
var app = require('./config/express')(db);
|
||||
|
||||
|
|
Loading…
Reference in a new issue