adevday /
scoped
A modern & minimalist (less than 100loc) & clean library for scoped dependency injection, designed to work seamlessly with `async_hooks`.
Loading repository data…
zero-archive / repository
A modern, minimalist, and lightweight URL shortener using Node.js and Redis
A modern, minimalist, and lightweight URL shortener using Node.js and Redis.
$ git clone git@github.com:dotzero/node-url-shortener.git
$ cd nus
$ npm install
$ node app
$ node app -h
Usage: app [options]
Options:
-u, --url Application URL [default: "http://127.0.0.1:3000"]
-p, --port Port number for the Express application [default: 3000]
--redis-host Redis Server hostname [default: "localhost"]
--redis-port Redis Server port number [default: 6379]
--redis-pass Redis Server password [default: false]
--redis-db Redis DB index [default: 0]
-h, --help Show help [boolean]
$ git clone git@github.com:dotzero/node-url-shortener.git nus
$ cd nus
$ npm install --production
$ NODE_ENV=production node app --url "http://example.com"
POST /api/v1/shorten with form data long_url=http://google.com,
start_date="", end_date="", c_new=false.
NOTE: You can send the post requests without the date and c_new params
POST /api/v1/shorten with form data long_url=http://google.com, start_date="2017/06/19", end_date="2017/06/20", c_new=true
The c_new paramter is do that it creates a new short url if one already exists for the url
{
"hash": "rnRu",
"long_url": "http://google.com",
"short_url": "http://127.0.0.1:3000/rnRu",
"status_code": 200,
"status_txt": "OK"
}
GET /api/v1/expand/:hash with query rnRu
{
"start_date": "undefined",
"end_date": "undefined",
"hash": "rnRu",
"long_url": "http://127.0.0.1:3000/rnRu",
"clicks": "0",
"status_code": 200,
"status_txt": "OK"
}
OR if dates are set
{
"start_date": "2017/06/19",
"end_date": "2017/06/20",
"hash": "rnRu",
"long_url": "http://127.0.0.1:3000/rnRu",
"clicks": "0",
"status_code": 200,
"status_txt": "OK"
}
To run the test suite, first install the dependencies, then run npm test:
$ npm install
$ npm test
Released under the MIT license
Selected from shared topics, language and repository description—not editorial ratings.
adevday /
A modern & minimalist (less than 100loc) & clean library for scoped dependency injection, designed to work seamlessly with `async_hooks`.
bent10 /
A minimalist template for modern web development
ashu130698 /
A modern, minimalist e-commerce platform built with the MERN stack (MongoDB, Express, React, Node.js) and TypeScript.
NickiMash17 /
A modern, minimalist e-commerce platform selling tech gadgets with a stunning dark theme, glassmorphism effects, and smooth animations.
Amrut-1429 /
A modern, full-stack Expense Tracker designed with a focus on premium user experience and minimalist aesthetics. Built using the MERN stack (MongoDB, Express, React, Node.js), this application allows users to securely manage their finances with real-time analytics and a stunning, theme-aware interface.
root2jr /
A full-stack fashion e-commerce platform featuring secure Razorpay payment integration, real-time order management, and a modern, minimalist UI designed for the Indian market.