?高产朱莉娅的网络框架
由❤︎
Genie.jl是Genie框架的骨干,它为开发现代Web应用程序提供了简化且有效的工作流程。它建立在朱莉娅的优势(高级,高性能,动态,JIT)的基础上,揭示了丰富的API和有效的生产性网络开发工具集。
Genie框架由四个主要组成部分组成:
要了解有关Genie的更多信息,请访问文档和应用程序画廊。
如果您需要任何帮助,可以在不和谐中找到我们。
朱莉娅数据仪表板由精灵提供动力。应用程序画廊
? Genie Router: Genie真的很强大吗? Router 。将Web请求与函数匹配,提取和设置请求的变量和执行环境,并调用响应方法。功能包括:
GET , POST , PUT , PATCH , DELETE , OPTIONS ) # Genie Hello World!
# As simple as Hello
using Genie
route ( " /hello " ) do
" Welcome to Genie! "
end
# Powerful high-performance HTML view templates
using Genie . Renderer . Html
route ( " /html " ) do
h1 ( " Welcome to Genie! " ) |> html
end
# JSON rendering built in
using Genie . Renderer . Json
route ( " /json " ) do
( :greeting => " Welcome to Genie! " ) |> json
end
# Start the app!
up ( 8888 )? Websocket: Genie为通过Websockets的客户服务器通信提供了强大的工作流程
julia> using Genie, Genie . Router
julia> channel ( " /foo/bar " ) do
# process request
end
[WS] /foo/bar => #1 | :foo_bar ?模板:内置模板支持HTML , JSON , Markdown , JavaScript视图。
?身份验证:易于添加网站限制区域的数据库支持的身份验证。
julia> using Pkg
julia> Pkg . add ( " GenieAuthentication " ) # adding authentication plugin
julia> using GenieAuthentication
julia> GenieAuthentication . install ( @__DIR__ )⏰任务:任务允许您执行各种操作,并用CRONS作业将它们连接起来以进行自动化
module S3DBTask
# ... hidden code
"""
Downloads S3 files to local disk.
Populate the database from CSV file
"""
function runtask ()
mktempdir () do directory
@info " Path of directory " directory
# download record file
download (RECORD_URL)
# unzip file
unzip (directory)
# dump to database
dbdump (directory)
end
end
# ... more hidden code
end $ bin/runtask S3DBTask?插件生态系统:探索社区建造的插件,例如GenieAthentication,GenieAutorEload,GenieAthoration等等
呢? ORM支持:探索探照灯为精灵,支持Postgres,MySQL,SQLite和其他适配器的完整ORM解决方案
function search (user_names, regions, startdate, enddate)
# ... hidden code
where_filters = SQLWhereEntity[
SQLWhereExpression ( " lower(user_name) IN ( $( repeat ( " ?, " , length (user_names))[ 1 : end - 1 ] ) ) " , user_names),
SQLWhereExpression ( " date >= ? AND date <= ? " , startdate, enddate)
]
SearchLight . find (UserRecord, where_filters, order = [ " record.date " ])
# ... more hidden code
endDatabase Migrations module CreateTableRecord
import SearchLight . Migrations : create_table, column, primary_key, add_index, drop_table
function up ()
create_table ( :record ) do
[
primary_key ()
column ( :user_uuid , :string , limit = 100 )
column ( :user_name , :string , limit = 100 )
column ( :status , :integer , limit = 4 )
column ( :region , :string , limit = 20 )
column ( :date_of_birth , :string , limit = 100 )
]
end
add_index ( :record , :user_uuid )
add_index ( :record , :user_name )
add_index ( :record , :region )
add_index ( :record , :date_of_birth )
end
function down ()
drop_table ( :record )
end
endModel Validations更多的精灵功能,例如:
Files Uploads route ( " / " , method = POST) do
if infilespayload ( :yourfile )
write ( filespayload ( :yourfile ))
stat ( filename ( filespayload ( :yourfile )))
else
" No file uploaded "
end
endLogging | Caching | Cookies and Sessions | Docker, Heroku, JuliaHub, etc Integrations | Genie Deploy请使用GitHub流量贡献。创建一个分支,添加提交并打开拉动请求。
请阅读有关我们的CODE OF CONDUCT CONTRIBUTING信息以及向我们提交拉的请求的过程的详细信息。
很棒的Genie徽标是由Alvaro Casanova设计的
Hoppscoth for Realme结构模板
Genie使用了朱莉娅社区(Julia Community)友善贡献的多种包裹
该项目是根据MIT许可证获得许可的 - 有关详细信息,请参见LICENSE文件。
如果您喜欢这个项目,请考虑主演? genie.jl github repo。它将帮助我们为开源项目提供资金。