How to remove a file on Background on Route of Express/Nodejs
exports.func = (req, res) => { const fpath = res.locals.fpath res.on('finish', () => { fs.unlink(fpath, (err) => { if(err) {…
exports.func = (req, res) => { const fpath = res.locals.fpath res.on('finish', () => { fs.unlink(fpath, (err) => { if(err) {…
function make_ranged_array(start, length){ return [...Array(length)].map((_, i) => { return start + i }) }
You can do ‘dot access’ instead of key access. It looks smart way compare with dictonary. You can inherit Person…
npm init -y npm install typescript ts-node @types/node --save-dev npx tsc --init touch main.ts npx ts-node main.ts
In your disk In your directory The main difference is that the first command displays the total size of each…
const axios = require('axios') const FormData = require('form-data') const crypto = require('crypto') // const fs = require('fs') const get_image(url) =>…
for f in ./*.jpg do echo $f echo ${#f} if [ ${#f} -gt 20] then rm $f fi done
Basic Authentication Basic authentication has been used for many web services like Nginx. In Basic authentication, the username/password pair is…
Firebase has a huge impact on web engineers in that development cost is surprisingly getting less to develop. We can…