Skip to content
Micro framework for web programming in Julia
Julia HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
docs
src
test
.gitignore
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.md
Project.toml
README.md
REQUIRE
appveyor.yml
merly.png

README.md

Merly.jl

Micro framework for web programming in Julia.

About

Merly is a micro framework for declaring routes and handling requests. Quickly creating web applications in Julia with minimal effort.

Roadmap

All contributions and suggestions are welcome !!!!

Version 0.3

  • Websocket module implementation

Version 0.3.1

  • Performance improvement

Installing

Pkg> add Merly

Example

using Merly

u="hello"

server = Merly.app()

@page "/" "Hello World!"
@page "/hello/:usr>" "<b>Hello {{usr}}!</b>"

@route GET "/get/:data>" begin
  "get this back: {{data}}"
end

@route POST "/post" begin
  res.body = "I did something!"
end

@route POST|PUT|DELETE "/" begin
  println("params: ",req.params)
  println("query: ",req.query)
  println("body: ",req.body)

  res.headers["Content-Type"]= "text/plain"

  "I did something!"
end

Get("/data", (req,res)->(begin
  res.headers["Content-Type"]= "text/plain"
  u*"data"
end))


Post("/data", (req,res)->(begin
  println("params: ",req.params)
  println("query: ",req.query)
  println("body: ",req.body)
  res.headers["Content-Type"]= "text/plain"
  global u="bye"
  "I did something!"
end))


server.start(config=Dict("host" => "127.0.0.1","port" => 8000),verbose=false)
You can’t perform that action at this time.