mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 02: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
|
||||
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.attributes,
|
||||
`./output/${id}`
|
||||
rocketeer.attributes, path
|
||||
);
|
||||
|
||||
// Namify the attributes
|
||||
|
Loading…
x
Reference in New Issue
Block a user