To make a JS script use VS Code (recommended) or any editor of your choice. Create a new file with
.js extension and put it in the CLEO folder. See Script lifecycle for extra information.
CLEO Redux is not Node.js. Don't expect sockets, file system operations or other Node.js features to be available here.