mirror of
https://github.com/strapi/strapi.git
synced 2025-08-01 13:29:01 +00:00
17 lines
396 B
JavaScript
17 lines
396 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
const crypto = require('crypto');
|
||
|
|
||
|
const fs = require('fs');
|
||
|
const path = require('path');
|
||
|
const _ = require('lodash');
|
||
|
|
||
|
module.exports = () => {
|
||
|
const tmpl = fs.readFileSync(path.join(__dirname, 'env.template'));
|
||
|
const compile = _.template(tmpl);
|
||
|
|
||
|
return compile({
|
||
|
appSecrets: new Array(4).fill().map(() => crypto.randomBytes(16).toString('base64')).join(','),
|
||
|
});
|
||
|
};
|