bug fixes

This commit is contained in:
Guillermo Bonet 2022-11-04 14:53:18 +01:00
parent e1c6e32860
commit 0eb21b7e87
3 changed files with 10 additions and 9 deletions

View File

@ -28,7 +28,6 @@ COPY \
main.js \ main.js \
print-server.js \ print-server.js \
config.yml \ config.yml \
service.js \
entrypoint.sh \ entrypoint.sh \
./ ./
COPY sql sql COPY sql sql

View File

@ -1,13 +1,13 @@
debug: true debug: true
db: db:
host: localhost host: localhost
port: 3306 port: 3306
user: user user: user
password: password password: password
database: schema database: schema
salix: salix:
url: http://localhost:3000 url: http://localhost:3000
user: user user: user
password: password password: password
reconnectTimeout: 30 reconnectTimeout: 30
refreshRate: 1000 refreshRate: 1000

View File

@ -113,6 +113,8 @@ class PrintServer {
}); });
const printer = printJob.printer; const printer = printJob.printer;
if (!fs.existsSync(path.join(appDir, 'tmp')))
fs.mkdirSync(path.join(appDir, 'tmp'))
const tmpFilePath = path.join(appDir, 'tmp', `${Math.random().toString(36).substring(7)}.pdf`); const tmpFilePath = path.join(appDir, 'tmp', `${Math.random().toString(36).substring(7)}.pdf`);
await fs.writeFile(tmpFilePath, response.data, 'binary'); await fs.writeFile(tmpFilePath, response.data, 'binary');