raynode

Raynode

MicroAPIFramework for Crystal Programming Language

Usage

require "raynode"

# Handlers for each route.
def index() 
  return "MAIN PAGE" 
end

def sup() 
  return "SUP PAGE" 
end

# Route Definitions.
ROUTES = {"/" => index, 
          "/r/sup" => sup}

# Listen and Serve...
Raynode::App.new(ROUTES, 8080)

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      raynode:
        github: https://github.com/randiaz95/raynode
    
  2. Run shards install

Usage

require "raynode"

# Handlers
# Create all of the functions here.
def index() 
  return "MAIN PAGE" 
end

def sup() 
  return "SUP PAGE" 
end

# put a route to connnect to the function.
ROUTES = {"/" => index, "/r/sup" => sup}

# Listen and serve Raynode.
Raynode::App.new(ROUTES, 8080)

TODOS:

We need everything lol this is just a routing app for now...

Contributing

  1. Fork it (https://github.com/your-github-user/raynode/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

raynode

Owner
Statistic
  • 0
  • 0
  • 1
  • 0
  • 0
  • almost 6 years ago
  • December 14, 2019
License

MIT License

Links
Synced at

Sat, 25 Oct 2025 11:11:55 GMT

Languages