irpcpro/tele-link
最新稳定版本:1.0.0
Composer 安装命令:
composer create-project irpcpro/tele-link
包简介
Tele Link (link shortener) a pure php project with custom micro framework.
README 文档
README
Version: 1.0.0
Link shortening system (PHP) pure php project with custom micro framework.
Installation
Install this project via Composer:
composer create-project irpcpro/tele-link
Requires:
- php: "^7.4",
- vitodtagliente/pure-routing: "^1.0",
- rych/phpass: "^2.0",
- firebase/php-jwt: "^6.3",
- ext-json: "*",
- ext-mysqli: "*"
Database Configuration
for set your database configuration, edit config/app-config.php
Create Default Database Tables
Run this script to create database tables
~ composer run-script sql-creator
Run Application
For run application, just need to run server on .\public\
~ cd .\public\
~ php -S localhost:8080
Or run server on .\public\ directory.
Routes
- Login [POST]:
{{host}}/api/v1/user/login
{
"username": "admin",
"password": "123"
}
- Create Link [POST]
⚠️ need authorization
{{host}}/api/v1/shortener/create
{
"link": "https://facebook.com"
}
- Get All Links [GET]
⚠️ need authorization
{{host}}/api/v1/shortener/get-all?limit=10
- Delete Links [DELETE]
⚠️ need authorization
{{host}}/api/v1/shortener/delete/{link_id}
- Edit Links [EDIT]
⚠️ need authorization
{{host}}/api/v1/shortener/edit
{
"link_id": 5,
"link": "http://google-new.com"
}
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-13