Comments (3)
Hi @IvanDrag0
Thanks for the very detailed issue.
I think the filename property should be the absolute file path, so it would be something like:
/Users/user/projects/lowdefy/tutorial/tutorial_db.sqlite
If that works then the String expected
is probably because the secret is not being read correctly- the environment variable should be LOWDEFY_SECRET_SQLITE_FILENAME
, the LOWDEFY_SECRET_
gets removed from the secret name.
from lowdefy.
Hi @SamTolmay,
I just erased the project, copied the one from the example repo, and used the full and relative paths. The full path did work (not sure why it didn't work yesterday), but the relative path still failed. After a bit of testing and digging around, I might have found the reason that the relative paths don't work (at least on Windows).
If I specify a relative path for the sqlite file (the same way I did in my original issue), I get the error that the table doesn't exist. However, that's an incorrect error since if the app can't find the file, it should just say that the file is not found. I believe the reason that it gives an error regarding the table is because it creates a blank (0 Kb) sqlite file in the root of the application itself (not where the yaml configs are).
Which explains the error since it can actually find the file (since the app seem to create it), but the file is blank. When I stopped the program and replaced the 0 Kb file with the database file I used, everything worked as expected.
This means that (at least on Windows), for this to work with relative paths (I suspect that this issue would affect other areas), you'll need to either change the working directory to where the yaml files. Or allow the user to define where the node/lowdefy files are and where the app yaml files (which would probably be a more versatile option).
from lowdefy.
I had forgotten, but this is why we recommended using absolute paths for the filename. The server, and therefore also the SQLite driver are running from the server directory, and therefore it interprets paths relative to that directory, not the config directory (where the lowdefy.yaml file is placed).
We download the server code to the ./.lowdefy/dev
and ./.lowdefy/server
directories to avoid clashes with other files. You can configure these directories by using the --config-directory
, --dev-directory
and --server-directory
CLI arguments, or the LOWDEFY_DIRECTORY_CONFIG
, LOWDEFY_DIRECTORY_DEV
and LOWDEFY_DIRECTORY_SERVER
environment variables (https://docs.lowdefy.com/cli).
Because of the way these directories are structured, you should be able to get things to work if you specify the file path relative to the server directory - i.e. if you do ../../tutorial_db.sqlite
instead of ./tutorial_db.sqlite
. This is a little confusing for new users, which is why we recommended the absolute path, but maybe it makes sense to have a deeper understanding of whats happening under the hood.
from lowdefy.
Related Issues (20)
- Build operators are not evaluated on refDefinition in buildRefs
- Selector options not displaying onClick.
- Auth UserFields remapping does not work. HOT 1
- Using Postgresql lowdefy seems to just create new connections and never close idle ones. HOT 1
- MSSQL custom port HOT 1
- Visibility toggle of display blocks removes value from state.
- SQLite connection doesn't seem to work HOT 5
- basePath not used for making API requests HOT 1
- Ag-Grid event onFilterChanged does not work HOT 1
- Lowdefy4.0DocsError
- Can't access _global in 4.0.0-rc.7 HOT 8
- Defined "pageId" setting for MenuGroup menu item produces error in console HOT 2
- Error on installing starter-jwt plugin. HOT 3
- Menu link style property not working.
- Lowdefy + Traefik HOT 1
- Docker image does not work as expected HOT 1
- Could not find "lowdefy.yaml" file in specified config directory HOT 2
- Affix container block does not stick to the viewport in 4.0.0-rc.10 documentation HOT 4
- onChange event of Tab block does not trigger on activeKey change
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lowdefy.