This is a node.js fullstack web application that shorten long urls
Install node.js if you haven't installed node.js yet
# https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
First of all you need to download this repo
$ git clone https://github.com/claudianus/urlshortener.git
$ cd urlshortener
At this moment you must rename or copy '.env.example' file to '.env' and modify the values in the file to suit your environment
$ cp .env.example .env
$ vim .env
Then install dependencies and setup database.. You don't need to install any database server software like mysql, mariadb because this app use sqlite by default
$ npm install
$ node ace migration:run --force
and start the app (server)
# start the server but if you're in production pm2(http://pm2.keymetrics.io/) is recommended
$ npm start
That's it
Using Cloudflare CDN (Free) to cache shortend urls
just amazing.