For reference:
require('path').resolve('./')
For reference:
require('path').resolve('./')
You can always start nodemon
right inside of VSCode, but I’ve found it a much better experience starting nodemon
in Terminal, and simply attaching VScode process to its --inspect
option.
I was watching a series and had to shift my subtitles by 38 seconds every time I open a video. After a few times of pain, I ended up writing a script to cut the crap, have some fun, and get a bit into NodeJS file I/O! 😀
Continue readingSay we want the email
field on our User
model to be unique, so we set the Schema to be:
const UserSchema = new Schema({
email: {type: String, required: true, unique: true}
});
Somehow, it just doesn’t work. As it turns out, there are plenty of reasons why this wouldn’t work. Let’s see which one got you.
Continue reading