Skip to content

Commit

Permalink
bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
ndortega committed Oct 18, 2024
1 parent bb72867 commit ede9d60
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Oxygen"
uuid = "df9a0d86-3283-4920-82dc-4555fc0d1d8b"
authors = ["Nathan Ortega <[email protected]>"]
repo = "https://github.com/OxygenFramework/Oxygen.jl.git"
version = "1.5.13"
version = "1.5.14"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Need Help? Feel free to reach out on our social media channels.
- Cron Scheduling (on endpoints & functions)
- Middleware chaining (at the application, router, and route levels)
- Static & Dynamic file hosting
- Hot reloads with Revise.jl
- Templating Support
- Plotting Support
- Protocol Buffer Support
Expand Down Expand Up @@ -605,7 +606,7 @@ When the server is ran, all tasks are started automatically. But the module also

## Hot reloads with Revise

Oxygen can interoperates with Revise to provide hot reloads, speeding up development. Since Revise recommends keeping all code to be revised in a package, you first need to move to this type of a layout.
Oxygen can integrate with Revise to provide hot reloads, speeding up development. Since Revise recommends keeping all code to be revised in a package, you first need to move to this type of a layout.

[First make sure your `Project.toml` has the required fields such as `name` to work on a package rather than a project.](https://pkgdocs.julialang.org/v1/toml-files/)

Expand Down
2 changes: 1 addition & 1 deletion demo/ProjectBasedDemo/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ version = "0.1.0"
Oxygen = "df9a0d86-3283-4920-82dc-4555fc0d1d8b"

[compat]
Oxygen = "1.5.13"
Oxygen = "1"
35 changes: 35 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Need Help? Feel free to reach out on our social media channels.
- Cron Scheduling (on endpoints & functions)
- Middleware chaining (at the application, router, and route levels)
- Static & Dynamic file hosting
- Hot reloads with Revise.jl
- Templating Support
- Plotting Support
- Protocol Buffer Support
Expand Down Expand Up @@ -603,6 +604,40 @@ end

When the server is ran, all tasks are started automatically. But the module also provides utilities to have more fine-grained control over the running tasks using the following functions: `starttasks()`, `stoptasks()`, and `cleartasks()`

## Hot reloads with Revise

Oxygen can integrate with Revise to provide hot reloads, speeding up development. Since Revise recommends keeping all code to be revised in a package, you first need to move to this type of a layout.

[First make sure your `Project.toml` has the required fields such as `name` to work on a package rather than a project.](https://pkgdocs.julialang.org/v1/toml-files/)

Next, write the main code for you routes in a module `src/MyModule.jl`:

```
module MyModule
using Oxygen; @oxidise
@get "/greet" function(req::HTTP.Request)
return "hello world!"
end
end
```

Then you can make a `debug.jl` entrypoint script:

```
using Revise
using Oxygen
using MyModule
MyModule.serve(revise=:eager)
```

The `revise` option can also be set to `:lazy`, in which case revisions will always be left to just before a request is served, rather than being attempted eagerly when source files change on disk.

Note that you should run another entrypoint script without Revise in production.

## Multiple Instances

In some advanced scenarios, you might need to spin up multiple web severs within the same module on different ports. Oxygen provides both a static and dynamic way to create multiple instances of a web server.
Expand Down
2 changes: 1 addition & 1 deletion src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ oxygen_title = raw"""

function serverwelcome(external_url::String, docs::Bool, metrics::Bool, parallel::Bool, docspath::String)
printstyled(oxygen_title, color=:blue, bold=true)
@info "📦 Version 1.5.13 (2024-09-02)"
@info "📦 Version 1.5.14 (2024-10-17)"
@info "✅ Started server: $external_url"
if docs
@info "📖 Documentation: $external_url" * docspath
Expand Down

2 comments on commit ede9d60

@ndortega
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/117541

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.5.14 -m "<description of version>" ede9d60d0fa9d32f13619d9eab4b270b84d926a0
git push origin v1.5.14

Please sign in to comment.