How to integrate Express.js and Sequelize - Part 2

October 6, 2017 3 Min

This article will continued Part 1, in the part 1 we create two models, in the part 2 we will know how to use model to do CRUD(Create, Read, Update, Delete).

If you are lost, do not know what is this, you may read part 1 first.


We need a page to display master information, first edit your index route in the routes directory, it could look likes below.

var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });

module.exports = router;

How to get response time with curl

September 23, 2016 1 Min

curl is a powerful tool help us send request to a website, for example:

$ curl

Today, I will tech you guys how to get response time with curl, first we need add -w or –write-out option and we need to know total time, full command likes below:

$ curl -w %{time_total}

How to clone AWS CodeCommit repository from EC2 instance

August 13, 2016 2 Min

CodeCommit is a git service in AWS, you can own the private repository just a small fee, if you are personal or small group will be not charged any fee in some way.

Well, I will deploy my application from CodeCommit to EC2, below is my way. First I created a repository in CodeCommit.

Before create a new EC2 instance, add a new IAM role.

Uptime Robot - Free monitoring your server

August 5, 2016 1 Min

Do you need to know your website or server still alive from internet? Uptime Robot will help you to monitoring your server from internet and it is free! For free user, Uptime Robot provide 50 monitors and check it every 5 minutes, you can upgrade your account to pro plan then you can monitoring every 30 seconds.