My flight was delayed and I was bored. Inspired by 9m
- Nodejs
- Mongodb
npm install
Start Mongodb
node index.js
# Creation
$ curl --data "url=akenn.org" http://localhost:4000/create
{
"url":"akenn.org",
"key":"뙩ㄳ",
"hits":0,
"link":"http://localhost:4040/뙩ㄳ"
}
# Retrieval
$ curl http://localhost:4040/show/뙩ㄳ
{
"url":"akenn.org",
"key":"뙩ㄳ",
"hits":0,
"link":"http://localhost:4040/뙩ㄳ"
}
- Re-write checking for proxy host/port
- restructure
routes/urls.js
(really messy, lots of sloppy code)