api/controllers/CommandsController.js
/**
 * Creates a temp copy (txt file) containing the movie's description.
 **/
Creates a temp copy (txt file) containing the movie's description.
Creates a temp copy ( txt file ) containing the movie ' s description .
function writeFIle(newFileName, content) {
  console.log('\n## Write File:' + content);
  return new Promise(function(resolve, reject) {
    fs.writeFile(
        `${PROJECT_PATH}temp/${newFileName}.txt`, content, function(err) {
          if (err) reject(`Error writing file "${newFileName}.txt"`);
          resolve(true);
        });
  });
}
function writeFIle ( newFileName , content ) { console . log ( '\n## Write File:' + content ) ; return new Promise ( function ( resolve , reject ) { fs . writeFile ( ` ${ PROJECT_PATH } ${ newFileName } ` , content , function ( err ) { if ( err ) reject ( ` ${ newFileName } ` ) ; resolve ( true ) ; } ) ; } ) ; }
Creates a temp copy (txt file) containing the movie's description.
Creates a temp copy ( txt file ) containing the movie ' s description .