admin_dashboard_react/generatetoken.js
SnippetsX 475e1e1b45
All checks were successful
Testing Example / build-and-test (push) Successful in 2m2s
created dev branch where stored experimental eatures
fixed ci/cd
2024-11-22 23:54:10 +03:00

11 lines
304 B
JavaScript

const fs = require('fs');
const filePath = 'src/authtoken.json';
if (!fs.existsSync(filePath)) {
const randomToken = (Math.random().toString(36).substring(2, 10));
console.log("You're token is ", randomToken);
fs.writeFileSync(filePath, JSON.stringify({ token: randomToken }, null, 2));
}