Hmm.. So, you need a url shortener service on the hand, yah? You're in the rigth place!
OH! How can I run this!? :0
-
You must have a MongoDB running
-
Set your configuratons at resource/enviroment-sample.json
-
Rename this file to enviroment.json
-
Build the container
docker build -t "shorts" .
- Run!
docker run shorts
If you aren't using docker, no problem!
- Clone the project
- yarn or npm install
- node bin/ww
- Running on port 3000
YES! Now you have a.... an awesome url shortener service running on localhost:3000! Really, try it:
- Method: POST
- API: //localhost:3000
Send the URL at the request body
- Method: GET
- API: //localhost:3000/aXd79
The user will be redirect to the origin URL
- Method: DELETE
- API: //loalhost:3000/axd79
Oh, Thank you! To run the development enviroment do that:
docker-compose up
Now you have shorts running on port 3000 and a MongoDB container running on port 27017.
- Clone the project
- yarn or npm install
- node bin/www
- Running on port 3000!
- Node.js (>6). You can try older versions too.
- MongoDB