- Julia Web Framework ที่มีประสิทธิภาพสูง
สร้างด้วย❤︎โดยผู้ร่วมให้ข้อมูล
genie.jl เป็นกระดูกสันหลังของเฟรมเวิร์ก Genie ซึ่งให้เวิร์กโฟลว์ที่มีประสิทธิภาพและมีประสิทธิภาพสำหรับการพัฒนาเว็บแอพพลิเคชั่นที่ทันสมัย มันสร้างขึ้นจากจุดแข็งของจูเลีย (ระดับสูง, ประสิทธิภาพสูง, ไดนามิก, JIT คอมไพล์), เปิดเผย API ที่หลากหลายและชุดเครื่องมือที่ทรงพลังสำหรับการพัฒนาเว็บที่มีประสิทธิผล
Framework Genie ประกอบด้วยสี่องค์ประกอบหลัก:
หากต้องการเรียนรู้เพิ่มเติมเกี่ยวกับ Genie เยี่ยมชมเอกสารและแกลเลอรี่แอพ
หากคุณต้องการความช่วยเหลือในสิ่งใดคุณสามารถหาเราได้ใน Discord
Julia Data Dashboard ขับเคลื่อนโดย Genie แกลเลอรีแอพ
- Genie Router: Genie มีพลังจริงๆเหรอ? Router การจับคู่คำขอเว็บกับฟังก์ชั่นการแยกและตั้งค่าตัวแปรของคำขอและสภาพแวดล้อมการดำเนินการและเรียกใช้วิธีการตอบกลับ คุณสมบัติรวมถึง:
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 - Templating: เทมเพลตในตัวรองรับ 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- ระบบนิเวศปลั๊กอิน: สำรวจปลั๊กอินที่สร้างโดยชุมชนเช่น Genieauthentication, Genieauutoreload, Genieauthorisation และอื่น ๆ
️ การสนับสนุน orm: สำรวจ Searchlight เป็นโซลูชัน ORM ที่สมบูรณ์สำหรับ Genie, สนับสนุน Postgres, MySQL, SQLite และอะแดปเตอร์อื่น ๆ
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คุณสมบัติของ Genie เพิ่มเติมเช่น:
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 Flow สร้างสาขาเพิ่มการกระทำและเปิดคำขอดึง
โปรดอ่านราย CONTRIBUTING เกี่ยวกับ CODE OF CONDUCT ของเราและกระบวนการในการส่งคำขอดึงให้เรา
โลโก้ Genie ที่ยอดเยี่ยมได้รับการออกแบบโดย Alvaro Casanova
hoppscoth สำหรับเทมเพลตโครงสร้าง readme
Genie ใช้แพ็คเกจมากมายที่ได้รับการสนับสนุนจากชุมชนจูเลีย
โครงการนี้ได้รับใบอนุญาตภายใต้ใบอนุญาต MIT - ดูไฟล์ใบ LICENSE สำหรับรายละเอียด
หากคุณสนุกกับโครงการนี้โปรดพิจารณานำแสดงโดย? genie.jl github repo มันจะช่วยให้เราระดมทุนโครงการโอเพ่นซอร์สของเรา