fixed pdfFiller module import error
This commit is contained in:
parent
b9de9f95ca
commit
1c3471cc06
@ -36,7 +36,8 @@ var FormSchema = new Schema({
|
||||
language: {
|
||||
type: String,
|
||||
enum: ['english', 'french', 'spanish'],
|
||||
required: 'Form must have a language'
|
||||
required: 'Form must have a language',
|
||||
default: 'english'
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
@ -182,6 +183,8 @@ FormSchema.pre('save', function (next) {
|
||||
pdfFiller.generateFieldJson(that.pdf.path, function(err, _form_fields){
|
||||
if(err){
|
||||
next( new Error(err.message), null);
|
||||
}else if(!_form_fields.length){
|
||||
next( new Error('Generated formfields is empty'), null);
|
||||
}
|
||||
|
||||
//Map PDF field names to FormField field names
|
||||
|
||||
2
config/env/all.js
vendored
2
config/env/all.js
vendored
@ -6,7 +6,7 @@ module.exports = {
|
||||
description: 'Generate Forms from PDFs',
|
||||
keywords: 'typeform, pdfs, forms, generator, form generator',
|
||||
},
|
||||
port: process.env.PORT || 3000,
|
||||
port: process.env.PORT || 5000,
|
||||
templateEngine: 'swig',
|
||||
// The secret should be set to a non-guessable string that
|
||||
// is used to compute a session hash
|
||||
|
||||
13
package.json
13
package.json
@ -2,11 +2,11 @@
|
||||
"name": "medforms",
|
||||
"description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
|
||||
"version": "0.0.1",
|
||||
"private": false,
|
||||
"author": "https://github.com/meanjs/mean/graphs/contributors",
|
||||
"private": true,
|
||||
"author": "https://github.com/whitef0x0/medforms/graphs/contributors",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/meanjs/mean.git"
|
||||
"url": "https://github.com/whitef0x0/medforms.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.28",
|
||||
@ -15,10 +15,11 @@
|
||||
"scripts": {
|
||||
"start": "grunt",
|
||||
"test": "grunt test",
|
||||
"postinstall": "bower install --config.interactive=false; ./node_modules/grunt-cli/bin/grunt"
|
||||
"postinstall": "bower install --config.interactive=false; grunt"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": "~0.9.0",
|
||||
"pdffiller": "whitef0x0/pdffiller",
|
||||
"body-parser": "~1.9.0",
|
||||
"bower": "~1.3.8",
|
||||
"chalk": "~1.0.0",
|
||||
@ -32,6 +33,7 @@
|
||||
"forever": "~0.11.0",
|
||||
"fs-extra": "~0.18.3",
|
||||
"glob": "~4.0.5",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-cli": "~0.1.13",
|
||||
"helmet": "~0.5.0",
|
||||
"lodash": "~2.4.1",
|
||||
@ -39,7 +41,6 @@
|
||||
"method-override": "~2.3.0",
|
||||
"mongoose": "~3.8.8",
|
||||
"morgan": "~1.4.1",
|
||||
"multer": "~0.1.8",
|
||||
"nodemailer": "~1.3.0",
|
||||
"passport": "~0.2.0",
|
||||
"passport-facebook": "~1.0.2",
|
||||
@ -53,6 +54,8 @@
|
||||
"then-fs": "~2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"multer": "~0.1.8",
|
||||
"mocha": ">=1.20.0",
|
||||
"grunt-concurrent": "~1.0.0",
|
||||
"grunt-contrib-csslint": "~0.3.1",
|
||||
"grunt-contrib-cssmin": "~0.10.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user