A small url shortener to get my hands on the MEAN stack
System Requirements: Node, Bower. Required dependencies are installed during the steps below.
- Clone this repo:
git clone https://github.com/sboichon/shrtnr
- Install node depencies:
npm install
- Install angular dependencies:
bower install
- Run the tests :
npm test
- Run the server:
node server.js
- Follow a shortlink: GET
/go/{id}
- Get info on all registered shortlinks: GET
/links
- Get info on a particular shortlink: GET
/links/{id}
- returns a JSON shortlink object, with
_id
,url
andcreated_at
(timestamp)
- returns a JSON shortlink object, with
- Create a shortlink: POST
/links
- Send
{"url": "http://mydomain.com"}
as JSON; returns the JSON shortlink object it just created.
- Send
- Delete a shortlink: DELETE
/links/{id}