【文件属性】:
文件名称:links:使用 NodeJS 和 SQLite3 制作的简单 URL 缩短器
文件大小:30KB
文件格式:ZIP
更新时间:2021-05-29 22:34:06
nodejs url-shortener JavaScript
链接
这是 TrueWinter 使用 NodeJS 和 Sqlite3 作为数据库制作的一个简单的 URL 缩短器。
配置
config.js文件用于配置此软件。 以下是示例配置文件
var config = {
length : 6 ,
dbFile : './db.sqlite3' ,
expressProxy : '127.0.0.1' ,
password : 'password' ,
port : '19282' ,
domain : 'short.url' ,
homeRedirect : 'https://example.com'
} ;
module . exports = config ;
您应该使用 Nginx 等代理将请求代理到 URL 缩短器的端口(默认为19282 )。
用法
短网址创建
转到{domain}/new并输入长 URL、可选的
【文件预览】:
links-master
----server.js(9KB)
----config.js.example(338B)
----LICENSE(1KB)
----README.md(1KB)
----stats.html(457B)
----.gitignore(40B)
----new.html(526B)
----package-lock.json(95KB)
----package.json(315B)