GithubHelp home page GithubHelp logo

sailor's People

Contributors

adelgado avatar btuduri avatar devotiongeo avatar etiene avatar felipedaragon avatar fooflare avatar fperrad avatar gabrielhomsi avatar gitter-badger avatar humbedooh avatar ignacio avatar itpp16 avatar jperon avatar kplaube avatar leokaplan avatar lpereira avatar luisbg avatar m1cr0man avatar mascarenhas avatar mpeterv avatar padicao2010 avatar paulcuth avatar readmecritic avatar soapdog avatar xspager avatar zet23t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sailor's Issues

Unable to find function handle on windows

I have XAMPP with Apache 2.4.7 with mod_lua enabled. I have the latest from the sailor repository and when I try to access the index.lua I get this:

[Sun Mar 16 09:13:28.381380 2014] [lua:crit] [pid 9396:tid 1504] [client ::1:50161] AH01475: lua: Unable to find function handle in I:/remote/dev/sailor/index.lua

edit: Forgot to mention that the example.lua from the mod_lua apache documentation page works fine.

Moving sailor to organisation profile

Hello! I'm creating this issue in the hopes the members who are watching the repository receive a notification.

Sailor has now moved from my personal profile to its own organisation repository:
https://github.com/sailorproject

I also created a repository for discussing design ideas and the future of Sailor:
https://github.com/sailorproject/design

It already has 3 issues that we'd love to receive some input on such as ideas for a 1.0 release and the future of Sailor and tasks for Rails Girls Summer of Code :)

Cheers ๐Ÿ‘

attempt to set ngx.header.HEADER after sending out response headers

2015/06/15 15:46:19 [error] 5380#0: *1 attempt to set ngx.header.HEADER after sending out response headers, client: 10.0.2.2, server: file.proxy.dev, request: "GET /index.lua HTTP/1.1", host: "file.proxy.dev"

ngx_openresty-1.7.10.1 + LuaJIT 2.1.0-alpha + sailor 0.3

It seems that er nginx and sailor have set HTTP HEADER.
There are also some problems working with nginx rewrite rules because of my poor knowledge .
I'm a beginner for the framework with little lua practice , it looks graceful.
FYI.

Cannot quit server with CTRL-C / OS X

When I run Sailor in OS X Terminal with
lua start-server.lua
there is no way to quit, CTRL-C doesn't work.

The only way to get out of the process is by putting it into the backgroup (CTRL-Z) and killing the process manually (kill -9).

It not works well with nginx startup script

vhost.conf

...
root /home/vagrant/vagrant/wwwroot/file.proxy;
...

error.log

/usr/local/share/lua/5.1/sailor.lua:119: /root/themes/default/main.lp: Permission denied
stack traceback:
    [C]: in function 'assert'
    /usr/local/share/lua/5.1/sailor.lua:119: in function 'read_src'
    /usr/local/share/lua/5.1/sailor.lua:151: in function 'render'
    .../vagrant/vagrant/wwwroot/file.proxy/controllers/main.lua:4: in function <.../vagrant/vagrant/wwwroot/file.proxy/controllers/main.lua:3>
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1/sailor.lua:302: in function 'handlefunc'
    /usr/local/share/lua/5.1/remy.lua:163: in function 'run'
    /usr/local/share/lua/5.1/sailor.lua:46: in function 'launch'
    /home/vagrant/vagrant/wwwroot/file.proxy/index.lua:2: in function 

It seems the web root was changed while reloading nginx configration with my nginx startup script.
/etc/ini.d/nginx reload

It woks well when I use nginx -s reload to relod nginx.

Major rework on friendly urls

  • Double check the functioning of friendly URLs on Apache and Xavante.
  • Add friendly urls to Nginx build

I need help with this!

Use cgilua 5.2.1 so it works on Lua 5.2

Hi! I don't know if there is any problem running Sailor with Lua 5.2 but the cgilua, if I install the latest version of cgilua available on luarocks, the 5.2.1, it seem to work fine. So I suggest changing the rockspec. Does it make sense?

auto integrity test

a sailor_create option to create the test aplication so i can fiddle around
or(not exclusive) a script to run those tests automatically,

Make admin page

Make an some sort of graphical admin center, a page that is accessible through a special url and password protected, that accesses the current autogenerator functions for generating CRUDs and models and allows to write over the current conf/conf.lua file for updating settings of an application

Add a page:json function

Since returning JSON content is such a common case now, I propose to add a json function to the page module, where I just pass a variable plus options (which are passed to dkjson), like so:

page:json( data, { indent = true })

This essentially should do:

local json = require "dkjson"
page.theme = nil
page.layout = nil
page.r.content_type = 'application/json'
page:write(json.encode(data, {indent=true}))

What do you think?

Consider using mod_lua's internal database API instead of LuaSQL when available

If a user opts to use mod_lua for sailor, it might be an idea to use mod_lua's internal database API instead of LuaSQL. It has a much larger set of database drivers(mySQL, PostgreSQL, FreeTDS, ODBC, SQLite3, Oracle), and handles security very well through prepared statements. A brief introduction to using it can be found at http://modlua.org/api/database .

Furthermore, this would enable you to use persistent database connections through mod_dbd if you so choose.

This is merely a suggestion, you may of course choose not to to down this path.
On a side note; If you think there are limitations to mod_lua that prevent you from doing something, please drop me a note and I'll see if I can't make it work more in your favor.

Sailor + SQLite3

Thanks for this cool framework!

We're planning to use Sailor for an embedded project, which makes a lot of sense. Also given the embedded nature of our needs, we are going to use SQLite3 as a persistence database. Is there any documentation where I can find the way to setup a SQLite3 database?

Thanks!

Extensions

  • Have a way to easily integrate ready-to-go external modules as extensions / plugins

Rewrite Sailor's views

  • Make the use of Lua pages optional
  • Allow the use of a different ways or other template systems for rendering views
  • This will require a major rework on the Lua at client API
  • This must be configurable

Routes

Why are the routes like /?r=main/index?

Is it possible to be just /main/index?

sailor create doesn't work when spaces in path present

โžœ sailor create "OB Testclient"

sh: -c: line 0: syntax error near unexpected token('
sh: -c: line 0: cp -a /usr/local/share/lua/5.2/sailor/blank-app /Users/louis/My Projects/Git/ob_testclient' /usr/local/bin/lua: /usr/local/lib/luarocks/rocks-5.2/sailor/0.5-3/bin/sailor:72: exit stack traceback: [C]: in function 'assert' /usr/local/lib/luarocks/rocks-5.2/sailor/0.5-3/bin/sailor:72: in function 'create' /usr/local/lib/luarocks/rocks-5.2/sailor/0.5-3/bin/sailor:146: in function 'run' /usr/local/lib/luarocks/rocks-5.2/sailor/0.5-3/bin/sailor:156: in main chunk [C]: in ?

[Design] Architecture of adding extensions

Please, let's discuss the architecture of adding extensions to Sailor!

Suppose someone wants to integrate a specific library to sailor and create a wrapper around it or just create a ready to go small sailor module, for example:

A login system with a user model, a controller and some views.

And that this would have a rockspec and other people could just do something like:

luarocks install sailor-login
cd /path/to/my_app
sailor add login

I'd like suggestions on how to organize this and implement whatever's needed on sailor to enable this.

List of things we need to think about

  • namespace
  • conflict between extensions
  • different types of extentions, ex.:
    • a new logging system for sailor, that changes nothing on your app, just a new library that can be required x
    • a whole pack with views to be added to an app, like the login system

cant perform file upload using Apache 2.4.10

r:parsebody() returns two tables; The first one is a single-value key->pair list, the second one contains values as a list of items.

function handle(r)
  local single, multiple = r:parsebody(10240)
  r:puts(table.concat(multiple['b'] or {}, "-")) -- prints out "foo-bar" if b exists
  return apache2.OK
end

con:getlastautoid

it only works for mysql.
in postgres i am using something like this as an alternative:

function new_user(con, name)
    local id
    id = assert(con:execute(string.format("INSERT INTO user VALUES (%s) RETURNING uid",name)))
    return id
end

404 on Xavante

When there are no 404 custom page configured, Xavante fails to exhibit the 404 default page even though we are returning 404 to the server.

Fix URLs in docs

Hi @Etiene,

I was peeking at the docs (well-written materials, by the way). I noticed something odd on the installation guide page. There are four links provided which are supposed to redirects to the "how-to install" Sailor on Linux, Windows and Mac tutorials.
Except that, they do not. They just redirect to the installation page itself. It just seems something went wrong when resolving URLs when generating the docs.

Can you take a look at that ?

Best regards.

List of things needed for releasing 1.0

(The design repository (https://github.com/sailorproject/design/issues) didn't really work out, so I am posting this here)

What do you think is necessary for claiming to be stable enough for production use so we can release a 1.0 version?

I already had some in mind so I'll list them here, please list more things as well

  • I just measured tests coverage for the first time today. It is shitty (45%). I'd say it should go above 95% at the very least. Thanks to @mpeterv now we know it's actually 76%, and after discussion I think striving for about 80-85% should be fine Coverage is now over 80%
    (#68)
  • We also need performance tests so we can defend ourselves technically a bit better
    (#55)
  • Improve overall compatibility with Nginx, since it is the most stable / active web server supporting Lua, it is only logical we give more support to them too
    (#72)
  • Rewrite the module for sending emails, because it is an essential feature and it is shitty if it doesn't work properly
    (#59)
  • Test the Xavante form file input upload because Xavante will be often used as a test server, so keeping up support to Xavante is ideal too
    (#74)
  • Enable users to easily develop and integrate their own extensions for Sailor, such as user-login modules etc. Example: http://www.yiiframework.com/extensions/
    (#82)
  • Update Bootstrap (#91)
  • Review session manager (#58)
  • Lua 5.3 compatibility. Status: waiting on LuaSQL release

What else should go here?

(Also, feel free to take this list as something significative to pick and contribute)

Fix 0.3 rockspec

Not all necessary files are being passed, such as files that relate to lighttpd compatibility.

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.