Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit 158bd47

Browse files
author
Nathan Ortega
authored
[New Framework]: Oxygen.jl (#8789)
* added Oxygen.jl example with /plaintext and /json tests * renamed framework from oxygen-jl to oxygen * renamed top level directory to match framework name * updated readme
1 parent 8cad819 commit 158bd47

5 files changed

Lines changed: 82 additions & 0 deletions

File tree

frameworks/Julia/oxygen/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Oxygen.jl Benchmarking Test
2+
3+
Oxygen is a micro-framework built on top of the HTTP.jl library and comes with helpful utilities to quickly setup and run web applications in Julia.
4+
5+
### Test Type Implementation Source Code
6+
7+
* [JSON](Relative/Path/To/Your/Source/File)
8+
* [PLAINTEXT](Relative/Path/To/Your/Source/File)
9+
10+
## Important Libraries
11+
The tests were run with:
12+
* [Oxygen.jl](https://github.com/OxygenFramework/Oxygen.jl)
13+
14+
## Test URLs
15+
### JSON
16+
17+
http://localhost:8080/json
18+
19+
### PLAINTEXT
20+
21+
http://localhost:8080/plaintext
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"framework": "oxygen",
3+
"tests": [
4+
{
5+
"default": {
6+
"json_url": "/json",
7+
"plaintext_url": "/plaintext",
8+
"port": 8080,
9+
"approach": "Realistic",
10+
"classification": "None",
11+
"database": "None",
12+
"framework": "Oxygen.jl",
13+
"language": "Julia",
14+
"orm": "None",
15+
"platform": "None",
16+
"webserver": "Oxygen.jl",
17+
"os": "Linux",
18+
"database_os": "Linux",
19+
"display_name": "Oxygen.jl",
20+
"notes": "",
21+
"versus": "",
22+
"tags": []
23+
}
24+
}
25+
]
26+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM julia:latest
2+
3+
WORKDIR /app
4+
COPY ./src ./
5+
RUN julia --project -e 'using Pkg; Pkg.instantiate()'
6+
7+
EXPOSE 8080
8+
CMD julia -t 2 --project server.jl
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[deps]
2+
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
3+
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
4+
Oxygen = "df9a0d86-3283-4920-82dc-4555fc0d1d8b"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
using Oxygen
3+
using Dates
4+
using HTTP
5+
6+
@get "/json" function()
7+
return json(("message" => "Hello, World!"))
8+
end
9+
10+
@get "/plaintext" function()
11+
return text("Hello, World!")
12+
end
13+
14+
function HeaderMiddleware(handle::Function)
15+
function(req::HTTP.Request)
16+
response = handle(req)
17+
HTTP.setheader(response, "Server" => "Julia-Oxygen")
18+
HTTP.setheader(response, "Date" => Dates.format(Dates.now(), Dates.RFC1123Format) * " GMT")
19+
return response
20+
end
21+
end
22+
23+
serveparallel(host="0.0.0.0", port=8080, middleware=[HeaderMiddleware], access_log=nothing, metrics=false, docs=false)

0 commit comments

Comments
 (0)