mirror of
https://github.com/NginxProxyManager/docker-nginx-full.git
synced 2026-05-18 07:40:36 +00:00
26 lines
475 B
JavaScript
26 lines
475 B
JavaScript
fs = require('fs');
|
|
|
|
tmpfile = '/tmp/nodejstest';
|
|
|
|
fs.writeFile(tmpfile, 'this is test data', function (err, data) {
|
|
if (err) {
|
|
console.error(err);
|
|
process.exit(1);
|
|
return;
|
|
}
|
|
|
|
console.log('Wrote test file successfully');
|
|
|
|
// Delete file
|
|
try {
|
|
fs.unlinkSync(tmpfile)
|
|
} catch (err) {
|
|
console.error(err);
|
|
process.exit(1);
|
|
return;
|
|
}
|
|
|
|
console.log('Removed test file successfully');
|
|
});
|
|
|