Use require in node.js scripts.
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 29 Jan 2021 12:19:57 +0000 (13:19 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 29 Jan 2021 12:19:57 +0000 (13:19 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/scripts/deleteChargingStations.js
src/scripts/setCSPublicFlag.js

index b3c8d0f3083d6ed863f7894f5f671258188b68ba..2e84eeba9f9dc3b2cac283067b2eea7f3233788f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 
-import MongoClient from 'mongodb';
-import fs from 'fs';
+const MongoClient = require('mongodb');
+const fs = require('fs');
 
 // This script deletes charging stations
 // Filter charging stations by id pattern
index 79d8600d5d1dacd2a809fa5f78e4c908a1f299a5..3ecf5089460cdd5ddcf1b321685434100341d356 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 
-import MongoClient from 'mongodb';
-import fs from 'fs';
+const MongoClient = require('mongodb');
+const fs = require('fs');
 
 // This script sets charging stations public or private
 // Filter charging stations by id pattern