carbon

command module
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2016 License: MIT Imports: 19 Imported by: 0

README

carbon Travis CI Circle CI Docker Pulls Docker Stars

Carbon is a Lua Application Toolkit with focus on Web Servers, written in Go.

Installing

go get -u github.com/carbonsrv/carbon

Usage

Flags

To get this list, just type carbon -h.

Usage of carbon:
  -cert="": Certificate File for HTTPS
  -config="": Parse Config File
  -debug=false: Show debug information
  -eval="": Eval Lua Code
  -gzip=false: Use GZIP
  -host="": IP of Host to bind the Webserver on
  -http=true: Listen HTTP
  -http2=false: Enable HTTP/2
  -https=false: Listen HTTPS
  -key="": Key File for HTTPS
  -logger=true: Log Request information
  -port=8080: Port to run Webserver on (HTTP)
  -ports=8443: Port to run Webserver on (HTTPS)
  -recovery=false: Recover from Panics
  -repl=false: Run REPL
  -root=".": Path to Web Root
  -script="": Parse Lua Script as initialization
  -states=8: Number of Preinitialized Lua States
  -workers=8: Number of Worker threads.

HTML Generation system

Let's start with an example:

doctype( -- Always start with the doctype
  tag"head"( -- Put your tags here.
    tag"title"("Hello World!")
  ),
  tag"body"( -- To put more than one tag in an existing tag, just put a comma after the inside tag and write your other tag after that.
    tag"h1"("Hello!"),
    tag"a"[{href="http://vifino.de/"}]("Link to my page!"), -- Supply arguments like that.
    link("http://vifino.de/")("Another link to my page!") -- Same thing as above, with a small helper function.
  )
)

This template language can be used both in static and dynamic configuration.

More info

Check the wiki!

License

MIT Copyright (c) 2015 Adrian Pistol

Third party software included with this may have different licenses. Check /builtin/NOTICE.txt.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
modules

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL