README ANd LICENSE

This commit is contained in:
xx
2024-05-28 15:55:01 +08:00
parent 84fcdaa19b
commit acfac3b3f8
2 changed files with 90 additions and 0 deletions

21
LICENSE.txt Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

69
README.md Normal file
View File

@@ -0,0 +1,69 @@
# Fast Web (快速网站开发框架)
## 简介
Fast Web 是使用 C++ 和 Lua 开发的网站框架以快速开发、部署简单为理念核心部分由C++实现Lua 脚本语言处理业务逻辑,
Fast Web 旨在简化复杂的部署和环境配置,使开发者能够迅速启动并运行他们的网站。
QQ群153076832
## 特性
- **LUA脚本**通过Lua脚本实现业务逻辑开发编写及维护更加容易
- **易于部署**:只需一个可执行文件
- **灵活易用**适合各类个人博客、API接口到复杂的企业级项目
## 示例
URL: http://127.0.0.1:8888/scripts/index.lua?key=123456
#### 拦截器
```lua
function access()
if request:pstring("key") == "123456" then
return true
end
response:send("密钥不正确,已被拦截器拦截.")
return false
end
```
#### 业务代码
```lua
-- 通用入口函数
function access()
-- MYSQL执行SELECT查询map表
local result = mysql:select():table("map"):query()
-- 构建回复数据
local data = result:table()
-- 返回JSON数据
json(data)
end
```
## 部署
目前仅支持Windows部署Linux将在下个版本支持
```bash
# 克隆仓库
git clone https://github.com/Liuccysdgg/fastweb.git
# 进入项目目录
cd fastweb
# 编译项目 (确保你的机器上安装了VS2022集成开发环境)
# 运行 fastweb.sln 编译
```
三方库均仅提供x64二进制发布版本,如需更新或修改请自行根据下方链接下载编译
## 🙇致谢
如果没有社区已有的优秀软件帮助fastweb就不可能构建出来
https://github.com/Liuccysdgg/ylib 跨平台快速开发库
https://github.com/ldcsaa/HP-Socket HPSocket高性能网络库
https://github.com/ThePhD/sol2 C++ 与 Lua 的绑定
https://github.com/lua/lua 脚本解释器