Giter Site home page Giter Site logo

clio's People

Contributors

kelyar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dovchar kelyar

clio's Issues

Sometimes process relaunches not correctly

In some cases after *.go or *.template file update

app  panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x2472e]

goroutine 32 [running]:
github.com/cliohq/clio/cli.(*Server).RelaunchProcess(0xc200000b78, 0xc200122a70, 0xc200000e38, 0x0, 0x0, ...)
    /Users/whoami/go/src/github.com/cliohq/clio/cli/application.go:55 +0xce
reflect.Value.call(0x252c60, 0x261f70, 0x130, 0x2c5500, 0x4, ...)
    /usr/local/go/src/pkg/reflect/value.go:474 +0xe9f
reflect.Value.Call(0x252c60, 0x261f70, 0x130, 0x5ebf00, 0x3, ...)
    /usr/local/go/src/pkg/reflect/value.go:345 +0x9b
net/rpc.(*service).call(0xc2000fb780, 0xc2000fb380, 0xc2000007a8, 0xc2000d6580, 0xc2001123e0, ...)
    /usr/local/go/src/pkg/net/rpc/server.go:379 +0x12b
created by net/rpc.(*Server).ServeCodec
    /usr/local/go/src/pkg/net/rpc/server.go:450 +0x37c
library % ps aux | grep application
user          21255   0.0  0.1 145313104   4728 s002  S     7:01PM   0:00.03 ./application ./application

App creator

Clio should have possibility to create an app skeleton from command line with, for example, clio create new_app command

Reporting errors to Errbit and Airbrake

Sending error reports to a named serviced. What need to be done:

  • Error reporting API
  • Plugin for sending reports
  • Data for Integration (api key etc) in application's settings.

Requirements:

  • Sending error should be non-blocking (sending error reports in a background)

Workers

Clio should have possibility to manage (run and watch) helper processes, defined in config/procfile

Managing dependencies

Make possible to install dependencies, declared in config/dependencies file with go get

Resource mapping

Looks unuseful:
func ControllerRoutes () {
Get ("/books", Books )
Get ("/books/", Book )
Post ("/books", BooksCreate)
Put ("/books/
", BookUpdate )
Delete ("/books", BooksRemove)
Delete ("/books/*", BookRemove )
}

I think it will be better something like that:

func ControllerRoutes () {
Resourse ("books", Books )
}

Make clio safely work with GOPATH

Strange bug according local packages appears on newest versions of Golang.
So we need to make Clio play with GOPATH nicely.

  • make sure that application is located inside GOPATH
  • change local packages calls in application's template and generated files to absolute ones, starting from application's root (for example ./routes should be changed to application/routes)

Methods to give away JSON content

Clio should have JSONGet () method, which receives same arguments, as Get () methods but give away content in application/json format without any layouts.

Redirects

Add Redirect (to string) function to core API

Proxy

Proxy for reloading back binary without missing connections

clio run

clio run
2013/08/12 22:40:38 Building application binary
app error occured: exec: "./application": stat ./application: no such file or directory

Improve messages in `clio run` mode

Not all messages of application process shows up in clio run mode. Thats not cool. Also there's no messages on application recompile and restart.

go run application.go

go run application.go
2013/08/12 22:38:38 open /var/folders/vp/vjytw_0x5937wrfqvxshy33h0000gp/T/go-build163112427/command-line-arguments/_obj/exe/tmp/pids/clio.pid: no such file or directory
exit status 1

Hot swapping

Clio should have possibility to swap code without restarting main server. Main way to do this - is to use proxy.
Also swapping process should recognise unsuccessful code building and use previous version of app binary and show compile error message.

When I create new app and run it I can see it in browser

Steps for reproduce:

  1. go get github.com/pallada/clio
  2. clio create myapp:
    error: open /src/github.com/pallada/clio/templates/config/application.go: no such file or directory
    error: open /src/github.com/pallada/clio/templates/config/assets.yml: no such file or directory
    error: open /src/github.com/pallada/clio/templates/config/dependencies: no such file or directory
    error: open /src/github.com/pallada/clio/templates/config/procfile.yml: no such file or directory
    error: open /src/github.com/pallada/clio/templates/public/javascripts/vendor/underscore/underscore.js: no such file or directory
    error: open /src/github.com/pallada/clio/templates/public/javascripts/vendor/backbone/backbone.js: no such file or directory
  3. clio run: nothing happen;

What the problem?

Add Security

CSRF attacks
Filter inputs
XSS attacks
SQL injection
Password storage
Encrypt and decrypt data

Simplify `clio run`

  • Remove IPC from clio run
  • Run application not as system process, but as go routine of clio run
  • Kill and restart application without compilation, just using Go channels
  • Built-in *.go and *.template file watching in clio run
  • Define all watching-related settings as application's settings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.