Developers Notes

My Journey as Software Architect

mysql

My Sequelize Notes

It's been 1 years since i'm into NodeJS, and sequelize is my favorite ORM to works with database. 1.After create a new Row, you want to get the ID of the data, you must make some changes in the model, and add this. id: { allowNull: false, …

react-navigation, navigate to same screen with different params

If you have some screen like blog post, and you have a related news, you can navigate using this const navigateAction = NavigationActions.navigate({ routeName: 'APage', params: { title: title, name: 'APage', }, key: 'APage' + APageUUID });…

Sequelize CheatSheet

Join Queries First, assign the related table in the model, you can put it on bottom of model, before export function User.hasMany(Post, {foreignKey: 'user_id'}) Post.belongsTo(User, {foreignKey: 'user_id'}) then you can call it using Post.…

MAMP & MAMP PRO mysql location

MAMP PRO is my favorite LAMP server for development in OSX. If you want to try the PRO version for 14 days, and revert back to non PRO, you can copy the mysql file from /Library/Application Support/appsolute/MAMP PRO/db/mysql to /Applicati…