mirror of
https://github.com/strapi/strapi.git
synced 2025-07-19 07:02:26 +00:00
17 lines
358 B
JavaScript
17 lines
358 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
const _ = require('lodash');
|
||
|
const crypto = require('crypto');
|
||
|
|
||
|
const fs = require('fs');
|
||
|
const path = require('path');
|
||
|
|
||
|
module.exports = () => {
|
||
|
const tmpl = fs.readFileSync(path.join(__dirname, `server.template`));
|
||
|
const compile = _.template(tmpl);
|
||
|
|
||
|
return compile({
|
||
|
adminJwtToken: crypto.randomBytes(16).toString('hex'),
|
||
|
});
|
||
|
};
|