lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


First question, was it working before using sqlite? 

Yes, the correct is without the 'project'.

There are 2 ways of routing, http://localhost:8080/category would be with friendly urls. Have you set friendly_urls to true on your app's conf.lua? ( Since this is a recent addition, the default is false.   If you did, there might be a bug with the friendly_urls. You can reset it to false and try http://localhost:8080/?r=category for the moment while I take a look at it. 

There are also 2 types of 404... When the app is run correctly but it does not find the correct routing, it shows a custom and modifiable 404 page (it's on /views/error/404.lp). For the moment Sailor has a debug system for inspecting variables, page:inspect(my_table) would print its content on the bottom of the page. However, if the app was not run and it showed the 404 from the webserver then it would depend on the webserver. Unfortunately I don't know how Xavante logs work yet.


2015-02-27 8:19 GMT+01:00 luciano de souza <>:
Hello all,

Sailor brought to me excelent perspectives in web development. But,
starting something entirely new is always a challenge.

I decided to change the blog example, given in the documentation, in
other to use it with Sqlite3.

In /conf/conf.lua, I made the following changes:

db.driver = 'sqlite'
db.dbname = '/db/database.dbl'

Having created the subdirectory /dv, inside it, I created a database,
using a modified version of /sql/mysql.sql. The structure was the
same. Changes are made only to do the same with the Sqlite sintax.

I did:

The default page is shown.

I did:

404? Page not found? why? The controler 'category.lua' existis and has
'/category/index.lp' associated.

I tried also:

It's a unlogical attempt, so 404 is shown again.


This is an attempt becose "project" is the name of the application.
However, the launcher is inside the root folder, so I believe the
correct is http://localhost:8080/category

See the last attempt:

Not Found
The requested URL http://localhost:8080/project/category/index was not
found on this server.

My OS is in portuguese; the message, in english. So I know it's an
answer of my local server.

The message does not help, since there's no additional information.

Is there a log support or a debug mode? How can I know what is wrong?

Best regards,

Luciano de Souza