This application can be used to convert any url into your own password protected short url.
-
Password Protected - You can set your own password for any url, when you will try to reach that short url it will ask you for password, when verified only then it will redirect to the original URL
-
Expiry date - You can set the expiy date for any URL. After that date/time user can not access the URL and will be redirected to the page given below.
-
Page not found - If you are trying to use different key and using the domain of the short url then you will be redirected to the "NOT FOUND" page.
- Clone the repo
git clone https://github.com/rajotron/url-shortner.git
- Install NPM packages
yarn install or npm install
Note: Remember to remove yarn.lock file from root directory before installing it via npm.
-
Run web application on local (Development environment)
yarn start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.You can directly use already deployed web app on Heroku at https://s0url.herokuapp.com
-
Install NPM packages
cd backend yarn install
-
Change database config in
backend/app/config/db.config.js
module.exports = { HOST: HOST_NAME, USER: USER_NAME, PASSWORD: DB_PASSWORD, DB: DB_NAME, dialect: "postgres", pool: { max: 5, min: 0, acquire: 30000, idle: 10000 } }
Default testing db config is already present there in this config file, but will be deleted after a while. _For more examples, please refer to the
- Run web server (express) on local (Development environment)
yarn start