@gradebook/teleport
v0.0.4
Published
Move data across @gradebook/server instances
Downloads
1
Readme
@gradebook/teleport
Move data across @gradebook/server instances
Importer
Generate SQL-like queries to import a user into an @gradebook/server database
Usage
import {readFileSync} from 'fs';
import {generateAPICalls} from './importer';
import {ValidationError} from './errors';
const exampleExport = readFileSync('./export.json');
try {
console.log(generateAPICalls(exampleExport, {gid: '206221626381630023572'}));
} catch (error) {
if (error instanceof ValidationError) {
console.log(error.message);
} else {
console.error(error);
}
}