FIX bug
This commit is contained in:
parent
9f79e988de
commit
a47f66cfb9
155
package.json
155
package.json
@ -1,79 +1,80 @@
|
|||||||
{
|
{
|
||||||
"name": "best-resume-ever",
|
"name": "best-resume-ever",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Collection of multiple resumes build with LESS and Mustache Templates.",
|
"description": "Collection of multiple resumes build with LESS and Mustache Templates.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/salomonelli/best-resume-ever"
|
"url": "git+https://github.com/salomonelli/best-resume-ever"
|
||||||
},
|
},
|
||||||
"author": "salomonelli",
|
"author": "salomonelli",
|
||||||
"homepage": "https://github.com/salomonelli/best-resume-ever",
|
"homepage": "https://github.com/salomonelli/best-resume-ever",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"resume",
|
"resume",
|
||||||
"template",
|
"template",
|
||||||
"mustache",
|
"mustache",
|
||||||
"less",
|
"less",
|
||||||
"cv",
|
"cv",
|
||||||
"curriculum",
|
"curriculum",
|
||||||
"vitae",
|
"vitae",
|
||||||
"electron",
|
"electron",
|
||||||
"grunt"
|
"grunt"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"server": "node --harmony-async-await src/app.js server",
|
"server": "node --harmony-async-await src/app.js server",
|
||||||
"dev": "concurrently --kill-others \"npm run server\" \"grunt --verbose\"",
|
"dev": "concurrently --kill-others \"npm run server\" \"grunt --verbose\"",
|
||||||
"pdf": "concurrently \"npm run server\" \"grunt --gruntfile GruntfilePdf.js --verbose\"",
|
"pdf": "concurrently \"npm run server\" \"grunt --gruntfile GruntfilePdf.js --verbose\"",
|
||||||
"lint": "eslint src/",
|
"lint": "eslint src/",
|
||||||
"test": "nyc mocha --harmony-async-await \"test/*.js\"",
|
"test": "nyc mocha --harmony-async-await \"test/*.js\"",
|
||||||
"istanbul": "istanbul cover node_modules/.bin/_mocha -- -- -u exports test/**/* --harmony-async-await"
|
"istanbul": "istanbul cover node_modules/.bin/_mocha -- -- -u exports test/**/* --harmony-async-await"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typopro/web-montserrat": "3.4.9",
|
"@typopro/web-montserrat": "3.4.9",
|
||||||
"babel-cli": "6.22.2",
|
"babel-cli": "6.22.2",
|
||||||
"babel-core": "6.22.1",
|
"babel-core": "6.22.1",
|
||||||
"babel-preset-es2015": "6.22.0",
|
"babel-preset-es2015": "6.22.0",
|
||||||
"buffer-to-string": "0.1.0",
|
"buffer-to-string": "0.1.0",
|
||||||
"clean-css": "4.0.4",
|
"clean-css": "4.0.4",
|
||||||
"electroshot": "1.2.0",
|
"electroshot": "1.2.0",
|
||||||
"express": "4.14.1",
|
"express": "4.14.1",
|
||||||
"font-awesome": "4.7.0",
|
"font-awesome": "4.7.0",
|
||||||
"fs": "0.0.1-security",
|
"fs": "0.0.1-security",
|
||||||
"hogan-express": "0.5.2",
|
"hogan-express": "0.5.2",
|
||||||
"html-pdf": "2.1.0",
|
"html-pdf": "2.1.0",
|
||||||
"html-to-pdf": "0.1.11",
|
"html-to-pdf": "0.1.11",
|
||||||
"http": "0.0.0",
|
"http": "0.0.0",
|
||||||
"jquery": "3.1.1",
|
"jquery": "3.1.1",
|
||||||
"less": "2.7.2",
|
"less": "2.7.2",
|
||||||
"less-plugin-clean-css": "1.5.1",
|
"less-plugin-clean-css": "1.5.1",
|
||||||
"local-web-server": "1.2.6",
|
"local-web-server": "1.2.6",
|
||||||
"markdown-to-html": "0.0.13",
|
"markdown-to-html": "0.0.13",
|
||||||
"material-design-icons": "3.0.1",
|
"material-design-icons": "3.0.1",
|
||||||
"mustache": "2.3.0",
|
"mustache": "2.3.0",
|
||||||
"mustache-express": "1.2.4",
|
"mustache-express": "1.2.4",
|
||||||
"normalize.css": "5.0.0",
|
"normalize.css": "5.0.0",
|
||||||
"npm-font-open-sans-condensed": "1.0.3",
|
"npm-font-open-sans-condensed": "1.0.3",
|
||||||
"open-sans-fontface": "1.4.0",
|
"open-sans-fontface": "1.4.0",
|
||||||
"path": "0.12.7",
|
"path": "0.12.7",
|
||||||
"phantomjs-prebuilt": "2.1.14",
|
"phantomjs-prebuilt": "2.1.14",
|
||||||
"raleway-webfont": "3.0.1",
|
"raleway-webfont": "3.0.1",
|
||||||
"request": "2.79.0",
|
"request": "2.79.0",
|
||||||
"request-promise": "4.1.1",
|
"request-promise": "4.1.1",
|
||||||
"roboto-fontface": "0.7.0",
|
"roboto-fontface": "0.7.0",
|
||||||
"showdown": "1.6.3",
|
"showdown": "1.6.3",
|
||||||
"typeface-chivo": "0.0.22",
|
"typeface-chivo": "0.0.22",
|
||||||
"write": "0.3.2"
|
"write": "0.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^3.3.0",
|
"concurrently": "^3.3.0",
|
||||||
"eslint": "3.15.0",
|
"eslint": "3.15.0",
|
||||||
"grunt": "^1.0.1",
|
"grunt": "^1.0.1",
|
||||||
"grunt-babel": "^6.0.0",
|
"grunt-babel": "^6.0.0",
|
||||||
"grunt-cli": "^1.2.0",
|
"grunt-cli": "^1.2.0",
|
||||||
"grunt-contrib-watch": "^1.0.0",
|
"grunt-contrib-watch": "^1.0.0",
|
||||||
"grunt-execute": "^0.2.2",
|
"grunt-execute": "^0.2.2",
|
||||||
"grunt-shell": "^2.1.0",
|
"grunt-shell": "^2.1.0",
|
||||||
"load-grunt-tasks": "^3.5.2",
|
"load-grunt-tasks": "^3.5.2",
|
||||||
"mocha": "3.2.0",
|
"mocha": "3.2.0",
|
||||||
"nyc": "10.1.2"
|
"nyc": "10.1.2",
|
||||||
}
|
"reload": "^1.1.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ const person = require('../person.js');
|
|||||||
const http = require('http');
|
const http = require('http');
|
||||||
const reload = require('reload');
|
const reload = require('reload');
|
||||||
|
|
||||||
let app, resumes, expressServer;
|
let app, resumes;
|
||||||
const Server = {
|
const Server = {
|
||||||
/**
|
/**
|
||||||
* sets configurations of express app
|
* sets configurations of express app
|
||||||
@ -24,19 +24,16 @@ const Server = {
|
|||||||
* starts up express app
|
* starts up express app
|
||||||
*/
|
*/
|
||||||
start: function() {
|
start: function() {
|
||||||
expressServer = app.listen(Config.port, '0.0.0.0', () => console.log('Listening on localhost:' + Config.port + '!'));
|
app.listen(Config.port, '0.0.0.0', () => console.log('Listening on localhost:' + Config.port + '!'));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* kills express app
|
* kills express app
|
||||||
*/
|
*/
|
||||||
kill: function() {
|
kill: function() {
|
||||||
/*
|
|
||||||
request.get('http://localhost:' + Config.port + '/kill')
|
request.get('http://localhost:' + Config.port + '/kill')
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error) return false;
|
if (error) return false;
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
if (expressServer) expressServer.close();
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* sets route of express app
|
* sets route of express app
|
||||||
@ -71,7 +68,7 @@ const Server = {
|
|||||||
setRoutesForResumes: function() {
|
setRoutesForResumes: function() {
|
||||||
const directories = Util.getDirectories();
|
const directories = Util.getDirectories();
|
||||||
for (let resume of directories) {
|
for (let resume of directories) {
|
||||||
this.setRoute('/' + resume, resume + '/index');
|
Server.setRoute('/' + resume, resume + '/index');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
autoReload: function() {
|
autoReload: function() {
|
||||||
@ -84,17 +81,14 @@ const Server = {
|
|||||||
*/
|
*/
|
||||||
run: async function() {
|
run: async function() {
|
||||||
resumes = Util.getResumesFromDirectories();
|
resumes = Util.getResumesFromDirectories();
|
||||||
this.setup();
|
Server.setup();
|
||||||
this.setRoute('/', 'views/index');
|
Server.setRoute('/', 'views/index');
|
||||||
this.setRoutesForResumes();
|
Server.setRoutesForResumes();
|
||||||
this.setKillRoute();
|
Server.setKillRoute();
|
||||||
this.kill();
|
Server.kill();
|
||||||
await Util.setTimeout(500);
|
await Util.setTimeout(500);
|
||||||
this.autoReload();
|
Server.autoReload();
|
||||||
this.start();
|
Server.start();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Server.run();
|
|
||||||
|
|
||||||
module.exports = Server;
|
module.exports = Server;
|
||||||
|
|||||||
0
test/node/Config.js
Normal file → Executable file
0
test/node/Config.js
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user