One big gotcha: select
actually has side effects. It updates the bound data.
6209604938
Say 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.
(916) 712-3345How to Auto-Deploy to Server on Git Push
Goal:
- If
git push
onmaster
branch - Then sync files onto server and deploy (e.g., running
yarn run build
or any other scripts)
I’m on DigitalOcean’s server, but this works on any self hosted servers.
cryptocarpousMac: How to Find Out Which App Is Blocking a Hotkey
If some hotkey doesn’t work for you, it’s likely that it got blocked by some other app in the background.
Continue readingDigitalOcean: ssh Permission denied (publickey) when SSH as Created User
Allowing password login will undermine the safety of server, so instead we can set up SSH login for each user.
Continue readingWebpack: New Resolve Root Path
- src
|- components
||- CatComponent.js
||- DogComponent.js
- node_modules
/* src/components/DogComponent.js */
import CatComponent from 'components';
For importing from another directive to work like imports from node_modules
like above, configure webpack.
jsPlumb: Reconnection after Removing Element
If you encounter a bug where all the re-established connections of a deleted div going to the top left of the screen: at the moment there’s no better solution than to delete all connections and repaint everything.
I’m using jsPlumb community version with React.
605-649-5253