mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 10:35:08 +02:00
Modify launch script to directly write to avatars folder in production mode
This commit is contained in:
parent
4867c455b9
commit
502aa93f23
@ -78,9 +78,15 @@ async function generateRocketeer(id) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Generate, compile and upload image
|
// Generate, compile and upload image
|
||||||
|
const { NODE_ENV: mode } = process.env;
|
||||||
|
let path;
|
||||||
|
if (mode == "production"){
|
||||||
|
path = '/var/www/avatars/' + id
|
||||||
|
}else{
|
||||||
|
path = './output/' + id
|
||||||
|
}
|
||||||
rocketeer.image = await svgFromAttributes(
|
rocketeer.image = await svgFromAttributes(
|
||||||
rocketeer.attributes,
|
rocketeer.attributes, path
|
||||||
`./output/${id}`
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Namify the attributes
|
// Namify the attributes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user