sailorproject / sailor Goto Github PK
View Code? Open in Web Editor NEWA Lua MVC Web Framework.
License: MIT License
A Lua MVC Web Framework.
License: MIT License
Why are the routes like /?r=main/index
?
Is it possible to be just /main/index
?
Confirmed on Xavante webserver running on Mac
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
help :~
our automated tests are gone :~
Travis has an old glibc version, I've tried all the impossible things to update it without success.
(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
What else should go here?
(Also, feel free to take this list as something significative to pick and contribute)
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
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.
As an extension
And get % of coverage
It's giving 404 errors
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?
The "Sailor" link in the header on the news, about, donate, etc. pages links to index.lua
instead of /index.lua
, causing a 404 when trying to navigate back home.
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.
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?
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
Should allow all kinds of comparisons like LIKE, >, <, not just equal
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!
Allow to send a boolean as argument to toggle validation on/off, default should be on
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
Sailor needs some benchmarks to compare with other tools!
contributors wanted for this <3
Support transactions on Postgresql, SQLite3 and MySQL
http://sailorproject.org/docs/?r=docs
None of the links work. Using chrome.
As I mention on #74 for Xavante, I just tested on Nginx the action upload on the dev-app (https://github.com/sailorproject/sailor/blob/master/test/dev-app/controllers/test.lua#L192) and fail to access the upload file due to differences on how it is presented to the application code.
Changes to Remy can be made or Sailor can be smarter about ngx.req.get_body_data() don't know.
Not all necessary files are being passed, such as files that relate to lighttpd compatibility.
โ 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 ?
a sailor_create option to create the test aplication so i can fiddle around
or(not exclusive) a script to run those tests automatically,
This will be useful for examples.
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.
I assume this would still work? Regardless, a yes/no in the docs would be appreciated.
Same thing as find_by_attributes but returns all rows, not just the first result.
Post is not working on lighttpd, only get.
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).
sailor_create try to use lua5.2 so it can't find the lfs
If I go to http://sailorproject.org/?r=docs/controllers I get an error:
attempt to index global 'sailor' (a nil value)
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.
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.
I need help with this!
start
or server
command that will run `start-server.lua"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.
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 ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.