dotzero / Node Url Shortener
Licence: mit
A modern, minimalist, and lightweight URL shortener using Node.js and Redis
Stars: ✭ 259
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Node Url Shortener
Redis Manager
Integrates your Laravel application with a redis manager
Stars: ✭ 245 (-5.41%)
Mutual labels: redis
Phpredisadmin
Simple web interface to manage Redis databases.
Stars: ✭ 2,841 (+996.91%)
Mutual labels: redis
Ecommerce website development
本项目基于Django1.8.2等来开发一个电商平台,可实现注册、登录、浏览、购买、支付等全部常用功能。
Stars: ✭ 246 (-5.02%)
Mutual labels: redis
Rusty Celery
🦀 Rust implementation of Celery for producing and consuming background tasks
Stars: ✭ 243 (-6.18%)
Mutual labels: redis
Javaguide
「Java学习+面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,首选 JavaGuide!
Stars: ✭ 114,707 (+44188.42%)
Mutual labels: redis
Cronlock
cronlock lets you deploy cronjobs cluster-wide without worrying about overlaps. It uses Redis to keep track of locks.
Stars: ✭ 253 (-2.32%)
Mutual labels: redis
Spring Boot Start Current
Spring Boot 脚手架 Mybatis Spring Security JWT 权限 Spring Cache + Redis
Stars: ✭ 246 (-5.02%)
Mutual labels: redis
Spring Cloud Shop
spring cloud 版分布式电商项目,全力打造顶级多模块,高可用,高扩展电商项目
Stars: ✭ 248 (-4.25%)
Mutual labels: redis
Type Graphql Series
Typescript GraphQL Server built with TypeGraphQL
Stars: ✭ 249 (-3.86%)
Mutual labels: redis
Zapi
基于swoole的异步轻量级api框架,内部封装全套mysql、redis、mongo、memcached异步客户端,可以轻松start、reload、stop,加入数据库的查询模块,框架已经封装好近乎同步写法,底层异步调用。现已支持异步mysql、异步redis、异步http请求.
Stars: ✭ 245 (-5.41%)
Mutual labels: redis
Eladmin
项目基于 Spring Boot 2.1.0 、 Jpa、 Spring Security、redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
Stars: ✭ 16,943 (+6441.7%)
Mutual labels: redis
Redis
Native port of Redis for Windows. Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs. This repository contains unofficial port of Redis to Windows.
Stars: ✭ 4,186 (+1516.22%)
Mutual labels: redis
Spring Boot Demo
Spring Boot & Spring Cloud & Spring Security Demo Case(Spring学习示例实战项目)
Stars: ✭ 255 (-1.54%)
Mutual labels: redis
Advanced Java
😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识
Stars: ✭ 59,142 (+22734.75%)
Mutual labels: redis
Atlas Of Thrones
An interactive "Game of Thrones" map powered by Leaflet, PostGIS, and Redis.
Stars: ✭ 253 (-2.32%)
Mutual labels: redis
Node Url Shortener
A modern, minimalist, and lightweight URL shortener using Node.js and Redis.
Using
Quick Start
$ git clone [email protected]:dotzero/node-url-shortener.git
$ cd nus
$ npm install
$ node app
Command Line Options
$ 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]
Installation on production
$ git clone [email protected]:dotzero/node-url-shortener.git nus
$ cd nus
$ npm install --production
$ NODE_ENV=production node app --url "http://example.com"
RESTful API
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"
}
Tests
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
License
Released under the MIT license
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].