文件名称:urly:概念证明URL缩短器
文件大小:95KB
文件格式:ZIP
更新时间:2024-04-21 04:51:57
TypeScript
乌里 概念证明URL缩短器 该项目使用来实现轻量级的URL缩短服务。 入门 首先,请安装依赖项并运行开发服务器。 npm install npm run start:dev 服务器启动后,打开浏览器到 您可以通过定义PORT环境变量来选择其他端口。 PORT=3030 npm run start:dev 配置 可以通过环境变量或通过项目根目录中存储的.env文件来设置配置参数。 以下是可配置参数及其默认值: 范围 描述 默认 港口 HTTP端口服务器侦听 3000 BASE_URL 用作基本起酥油的网址 DB_PATH 存储数据库的路径。 如果文件不存在,将创建它 src/db/urly.db 示例.env文件 .env文件可以存储所有自定义配置 BASE_URL="https://my.customurl.com" PORT=2600 # comments are
【文件预览】:
urly-master
----package.json(1KB)
----.github()
--------workflows()
----test()
--------server.test.ts(5KB)
--------index.test.ts(111B)
--------db-controller.test.ts(4KB)
--------shortener.test.ts(3KB)
--------fixtures()
--------config.test.ts(3KB)
--------db-connection.test.ts(5KB)
----jest.config.js(69B)
----prettier.config.js(88B)
----LICENSE(1KB)
----package-lock.json(285KB)
----app()
--------css()
--------error.html(320B)
--------404.html(330B)
--------index.html(704B)
--------js()
----src()
--------db()
--------controllers()
--------server.ts(3KB)
--------config.ts(732B)
--------utils()
--------index.ts(567B)
--------hash.js(596B)
----tsconfig.json(6KB)
----.gitignore(2KB)
----README.md(3KB)
----.vscode()
--------spellright.dict(5B)
--------settings.json(86B)