bug fixes
This commit is contained in:
parent
e1c6e32860
commit
0eb21b7e87
|
@ -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
|
||||||
|
|
16
config.yml
16
config.yml
|
@ -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
|
||||||
|
|
|
@ -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');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue