panel/app.moon

32 lines
672 B
Plaintext
Raw Normal View History

2015-01-05 21:41:19 +00:00
lapis = require "lapis"
require "models.user"
2015-01-05 21:41:19 +00:00
class App extends lapis.Application
2015-01-08 21:55:02 +00:00
layout: require "layout.bootstrap"
2015-01-07 21:21:05 +00:00
@include "controllers.users"
@include "controllers.freeswitch"
2015-01-07 21:21:05 +00:00
@before_filter =>
@current_user = Users\read_session @
if @session.flash
@flash = @session.flash
@session.flash = nil
2015-01-06 03:09:03 +00:00
[index: "/"]: =>
2015-01-09 01:51:20 +00:00
@name = @session.name
2015-01-06 03:09:03 +00:00
render: true
2015-01-10 02:52:53 +00:00
"/debug": =>
@html ->
config = require("lapis.config").get!
p config.port
2015-01-10 02:57:41 +00:00
p os.getenv "POSTGRESQL_PORT_5432_TCP_PORT"
p os.getenv "POSTGRESQL_PORT_5432_TCP_ADDR"
p os.getenv "DB_USER"
p os.getenv "DB_PASS"
p os.getenv "DB_NAME"