?高產朱莉婭的網絡框架
由❤︎
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。它將幫助我們為開源項目提供資金。