? 매우 생산적인 Julia 웹 프레임 워크
기고자들이 ❤︎와 함께 만들었습니다
Genie.JL은 Genie 프레임 워크의 중추로, 최신 웹 애플리케이션을 개발하기위한 간소화되고 효율적인 워크 플로우를 제공합니다. Julia의 강점 (높은 수준, 고성능, 동적, JIT 컴파일)을 바탕으로 Rich API와 생산적인 웹 개발을위한 강력한 툴셋을 노출시킵니다.
Genie Framework는 4 가지 주요 구성 요소로 구성됩니다.
Genie에 대한 자세한 내용은 문서와 앱 갤러리를 방문하십시오.
도움이 필요하면 불화에서 우리를 찾을 수 있습니다.
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 ? 템플릿 : 내장형 템플릿 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, genieautoreload, geneeauthorisation 등과 같은 커뮤니티에서 구축 한 플러그인 탐색
? 닐 ORM 지원 : Searchlight 탐색 Genie, 지원 포스트 그레, 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 DeployGithub 흐름을 사용하여 기여하십시오. 분기를 만들고, 커밋을 추가하고, 풀 요청을 엽니 다.
당사의 CODE OF CONDUCT 에 대한 자세한 내용과 당사에 풀 요청을 제출하는 프로세스는 CONTRIBUTING 읽으십시오.
Awesome Genie 로고는 Alvaro Casanova가 디자인했습니다
readme 구조 템플릿 용 Hoppscoth
Genie는 Julia 커뮤니티가 친절하게 기여한 다양한 패키지를 사용합니다.
이 프로젝트는 MIT 라이센스에 따라 라이센스가 부여됩니다. 자세한 내용은 LICENSE 파일을 참조하십시오.
이 프로젝트를 즐기고 있다면 주연을 고려하십시오. genie.jl github repo. 오픈 소스 프로젝트에 자금을 지원하는 데 도움이 될 것입니다.