Shorten URL built with Hapi
Reference: https://codetuts.tech/build-a-url-shortener-node-hapi-js/
** How to install and manage mongo locally **
- Download mongo
$ cd ~/Download
$ tar xzf mongodb-osx-x86_64-2.2.3.tgz
$ sudo mv mongodb-osx-x86_64-2.2.3 /usr/local/mongodb
- Assign permission
$ sudo mkdir -p /data/db
$ whoami
kdao
$ sudo chown kdao /data/db
- Create ~/.bash_profile
$ cd ~
$ pwd
/Users/kdao
$ touch .bash_profile
$ vim .bash_profile
export MONGO_PATH=/usr/local/mongodb
export PATH=$PATH:$MONGO_PATH/bin
##restart terminal
$ mongo -version
MongoDB shell version: 2.2.3
- Restart mongo
$ mongod