This commit is contained in:
ledlamp 2018-05-11 23:41:49 -07:00
parent 251b9a72c9
commit f330e625b0
2 changed files with 2 additions and 8 deletions

View File

@ -1 +1 @@
worker: node src/main.js
worker: node index.js

View File

@ -1,4 +1,3 @@
(async function(){
global.dbClient = new (require('pg').Client)({
connectionString: process.env.DATABASE_URL,
@ -6,11 +5,6 @@
});
await dbClient.connect();
var data = (await dbClient.query("SELECT content FROM files WHERE name = 'files.zip'")).rows[0].content;
var buff = Buffer.from(data, 'base64');
await (require('decompress'))(buff, 'files');
require('./files/src/main.js');
require('./src/main');
global['files.zip'] = buff;
})().catch(error => {console.error(error.stack); process.exit(1);});