rails new app-name --database=postgresql -BT
--database=postgresql
-> Use postgres for database-B
-> skip initial bundle install-T
-> skip test suite (we're using rspec)
rails g controller welcome
function asyncFunc() { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
const result = Math.random(); | |
result > 0.5 ? resolve(result) : reject('Oppps....I cannot calculate') | |
}, 1) | |
}); | |
} | |
for (let i=0; i<10; i++) { |