Vets-Who-Code / js-web-path-mountainmort

MIT License
3 stars 0 forks source link

Nodejs #9

Closed eduv2-local[bot] closed 1 year ago

eduv2-local[bot] commented 1 year ago
Task Use Nodejs to run Javascript with dependencies as a script on a server
Conditions Nodejs is installed and configured
Standards Initialize a npm folder and follow the parcel library getting started guide and in src/index.js have the following:
  • Delete the exported add function
  • Define 4 functions
  • 1 function that given a file path creates a file on the file system and logs out whether the file was created or not
  • 1 function that given a file path reads a file on the file system and logs the contents out
  • 1 function that given a file path deletes a file on the file system and logs out whether it successfully deleted that file or not
  • 1 function that given a file path and a string updates the file at the file path with the given string and logs out whether it was successful
  • After the function definitions create a variable and assign it a string that is a file path using process.cwd and path.join. Call the functions in the below order passing it in as a parameter.
  • Call the create file function
  • Call the Update file function with a random string
  • Call the Read file function
  • Call the Delete file function

Notes

References

mountainmort commented 1 year ago

Completed in: https://github.com/Vets-Who-Code/js-web-path-mountainmort/pull/17