This application shortens URLs. If no short URL is given, it creates a random short URL for the user. It was built from scratch entirely with Javascript.
Clone the repo: https://github.com/SomeSN/url-shortener.git to your desktop.
Node.js, npm, and MongoDB must be installed. If you need to install, please see below:
- Make sure you have node.js and npm installed and running. If you do not have these installed, go to https://www.npmjs.com/get-npm for more information and instructions.
If you are not sure if you have npm/node.js, type the following commands in your terminal to check:
For Node.js, in your terminal type:
node -v
For npm, in your terminal, type:
npm -v
To update the latest version of npm in your terminal type:
npm install npm@latest -g
-
You will need the following npm packages & their dependencies:
body-parser cors errorhandler express mongo mongoose morgan
-
Download and install (if you haven't already) MongoDB.
Follow the instructions here: https://docs.mongodb.com/manual/administration/install-community/
You may also with to install brew (but not mandatory): https://brew.sh/
You must run node.js and MongoDB simultaneously to run the app.
- MongoDB is run globally, so in terminal (it doesn't matter where) type:
mongod
- open a new terminal window and type:
mongo
-
Now its time to run node.js
-
Open a third terminal window. Navigate to the url-shortener/server folder. Then type: node app.js
-
Open localhost:3000 in your browser.
-
Try the app :)
Team Members: Noi @Noi-Git Amm @Saranrat13 Megan @Miss-Megan TK @SomeSN
- Thank you Sarah Van Wart & Ricky Holtz for all your time and attention. We really appreciate it. You two are the best!