Coder Social home page Coder Social logo

octaneweb / octane Goto Github PK

View Code? Open in Web Editor NEW
139.0 7.0 5.0 589 KB

A web server modeled after express in Rust.

License: MIT License

Rust 99.50% HTML 0.46% CSS 0.03% JavaScript 0.01%
rust rust-crate webserver web http-server https http octane

octane's People

Contributors

aplet123 avatar daksh14 avatar neverrare avatar osrepnay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

octane's Issues

move protocols etc. behind feature flags

Is your feature request related to a problem? Please describe.
no

Describe the solution you'd like
feature flags for e.g. ssl, tls, http2 etc.

Describe alternatives you've considered

Describe any implementations if you have one

Looking for contributors

Would love it if anyone is up for contributing to the project, we are running short of contributors

Handle expiration date or duration lifetime of cookies

Is your feature request related to a problem? Please describe.
Cookies are not tied to a expiration date/lifetime

Describe the solution you'd like
Ask the user for a Duration and form a expiration date from it and send it with Set-Cookie

Describe alternatives you've considered
None

Describe any implementations if you have one
None

Remap project structure

Remapping project structure in the following way (suggestions always welcome)

octane_http1x
octane_http2
octane_http3
octane_multipart
octane_router
...

Basically, sub crates for each component, that way it's easy to hide them behind feature requests and code is in better and findable places

Finish HTTP parsing

Get body parsing working, combine headers into a hashmap, and combine those into a data structure.

Implement static file serving middleware

Implement static file serving middleware, the method should return a closure and should be used like

let mut app = Octane::new();
// without route
app.add(Octane::static_dir("directory"));
// with route
app.add_route("/route", Octane::static_dir("directory"));

Handle and add a redirect feature

Is your feature request related to a problem? Please describe.
User cannot redirect to a page.

Describe the solution you'd like
None

Describe alternatives you've considered
None

Describe any implementations if you have one
None

Code panics when deading with certs for rustls

Describe the bug
Octane panics when you run it with rustls

To Reproduce

  1. Add the feature = ["rustls"]
  2. run the code below (make sure the cert and key locations are valid)
let mut app = Octane::new();
let mut config = OctaneConfig::new();
    config
        .ssl
        .key("templates/key.pem")
        .cert("templates/cert.pem");
    app.with_config(config);

Expected behavior
The site should work on https://localhost:8080/, instead panics when you try to start the server

Screenshots
None provided

Version of octane:
0.1

tokio = 0.3

Fully Upgrade to tokio 0.3

  • Keep alive
  • Run integration tests (wait for reqwest to upgrade to 0.3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.