-
Notifications
You must be signed in to change notification settings - Fork 0
/
i.js
28 lines (28 loc) · 797 Bytes
/
i.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var fs=require('fs');
var {spawn}=require('child_process');
var a=[
"globi",
"-f", "./sql/ads.sql",
"-f","./sql/blog.sql",
"-f","./sql/buser.sql",
"-f","./sql/chat.sql",
"-f","./sql/cladr.sql",
"-f","./sql/obi.sql",
"-f","./sql/prim_adr.sql",
"-f","./sql/reklama.sql",
"-f","./sql/vroom.sql",
"-f","./sql/reset.sql",
"-f","./sql/token_order.sql",
"-f","./sql/token_transfer.sql",
"-f","./sql/token_payout.sql",
"-f","./sql/bitaps_tmp.sql",
"-f","./sql/tokens_buy.sql",
"-f","./sql/sean.sql",
"-f","./sql/video.sql",
"-f","./sql/subscribe.sql"
]
//const ls=spawn('/usr/local/pgsql/bin/psql',a);
const ls=spawn('psql', a)
ls.stderr.on('data', data=>{console.log(data.toString())})
ls.stdout.on('data', data=>{console.log(data.toString());})
ls.on('exit',function(code){console.log("exit: ",code)})