Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/killme2008/node-shorten
A url shorten web site in node.js
https://github.com/killme2008/node-shorten
Last synced: about 1 month ago
JSON representation
A url shorten web site in node.js
- Host: GitHub
- URL: https://github.com/killme2008/node-shorten
- Owner: killme2008
- Created: 2012-11-25T05:14:36.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-11-10T01:47:45.000Z (about 7 years ago)
- Last Synced: 2024-04-15T12:49:10.030Z (7 months ago)
- Language: CSS
- Size: 103 KB
- Stars: 28
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
A URL shorten web site powered by Node.js and Express.js.
## Setup
First, I am using MySQL (data storage) and Redis (cache), so you have to configure MySQL/Redis in `config.js`:
exports.config = {
mysqlHost:"localhost",
mysqlUser:"root",
mysqlPassword:"",
mysqlDB:"shorten",
redisHost:'localhost',
redisPort:6379,site:'http://localhost:3000',
linkMinLength:10,
linkBits:6
}
It includes the user, password, database, Redis host/port, etc. Create the table using `sql/st_links.sql` before startup:msyql> source st_links.sql;
Second, you must install [Node.js](http://nodejs.org), then install Node modules by:sudo npm install -d
Last, startup the HTTP server:
sh start.sh
The site is online at `http://localhost:3000`.
## Chrome extension
You can install the chrome extension at `extensions/chrome`. It will use the API to short the URL in the current Chrome tab address bar.