add server dir

This commit is contained in:
Thomas Ruoff
2017-02-23 21:00:35 +01:00
parent 2441268fb8
commit db2c45342f
6 changed files with 0 additions and 0 deletions

19
server/utils.js Normal file
View File

@@ -0,0 +1,19 @@
const path = require('path');
function getDirPath(id) {
return `/tmp/pdfer-${id}`;
}
function getDocPath(id) {
return path.join(getDirPath(id), 'doc.tex');
}
function getPdfPath(id) {
return path.join(getDirPath(id), 'doc.pdf');
}
module.exports = {
getDirPath,
getDocPath,
getPdfPath
};