irpcpro / tele-link
Tele Link (link shortener) a pure php project with custom micro framework.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^7.4
- ext-json: *
- ext-mysqli: *
- firebase/php-jwt: ^6.3
- rych/phpass: ^2.0
- vitodtagliente/pure-routing: ^1.0
This package is auto-updated.
Last update: 2024-10-30 01:54:06 UTC
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"
}