2020-01-14 23:19:26 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
const network = require('../back/data/network');
|
|
|
|
const path = require('path');
|
|
|
|
const fs = require('fs');
|
|
|
|
|
|
|
|
(async () =>
|
|
|
|
{
|
2020-01-15 17:17:49 +00:00
|
|
|
const lines = ['1', '2', '3', '4'];
|
2020-01-14 23:19:26 +00:00
|
|
|
const data = await network.fetch(lines);
|
|
|
|
|
|
|
|
fs.writeFileSync(
|
|
|
|
path.join(__dirname, '../back/data/network.json'),
|
|
|
|
JSON.stringify(data)
|
|
|
|
);
|
|
|
|
})();
|