- static file server for
assets
and views
- simple views rendering/templating via string replace -- done
- view rendering
header, footer, layout and @body
-- done
@partial
-- done
- variable translation(ex.
_initdata
) -- done
- cookie & session
- session timeout -- no timeout but session & cookie work__
- login
- auto redirect when no session data -- done(need integration)
- require('./utils')
- sockjs -- done
- sockjs/smith gateway -- done
- smith/sockjs event gateway
- event for sockjs -- done
- callback can be handled one to many clients -- done
- auto reconnect to swixcore
- this must be done because even a simple argument mismatch between server and client can cause disconnection.
- block non-existed api calls -- done
- block or auto adjust wrong arguments calls -- need core modification
#browser
ss.emit 'system::get_sys_cfg', "useless arg", (f)->
#core
apidefs:
get_sys_cfg: (f)->
- controller
- controller concept -- done
- common functions for controllers
gethookh
-- done
withcore
-- done
coreat
-- done
A controller is the pair of an event and its handler(in websocket)
- A controller mostly carries related http handlers for common function -- done
- Only of thems also defines socket.io event handlers(aka
@on
)
- implement the same thing in sockjs -- done
- check if the GO can reply
http get
with header -- done
{ 'Content-Type': 'application/x-yaml'}, 200
{ 'Content-Type': 'application/x-json'}, 200
- implement
@withcore()
- list of controllers
- ip_conf ( with
@on
)
get_ipcfg
-- not need
save_ipcfg
-- not need
- login
- check
@redirect
-- done
- need
@session
-- done
- maintain_cfgfile
- import -- done
- export -- done
- export local logs -- done
- maintain_reboot ( with
@on
) -- done
get_mpart_cfg
set_mpart_cfg
- maintain_upgrade -- done
- ping ( with
@on
) -- done
run_ping
-- done
check_ping_msg
-- done
- search all controllers to include
- findfns -- not need. GO is static. All controlers will be compiled/linked.
- determine_core_at -- done
- process.env.TMP -- done
- do_loadmenu
- fliterout_menuitems -- done
- menu_kill -- done
- model determination -- done
- specify route handler and render the page with variables -- done
- https certificates
- http port
consider beego?
https://github.com/astaxie/beego/issues/20
finally, got goji! https://github.com/zenazn/goji