I have an open source project on github, and I want to know a way to store my database's connection string without sharing it within the code.
Maybe uploading a file that is not on git, with the credentials. Is it possible on Heroku? If not, how do I achieve this?
Thanks in advance
That's what config vars are for. Set one, and it will be available to your app as an environment variable. It lives outside your code base, as you (rightfully) want.
Related
Does anyone know how to create a password protected file in SQLiteStudio 3.1 ?
When I try to make a DB with type SQLCypher, trying to follow the steps in the youtube guidance, I allways end up with a file I can connect to, even without a password.
Can't find any usefull manual for this.....
When you create database, pick SQLCipher plugin, enter password. Newly created database should appear on the list of databases. Now just double click on it and it should open with no issues.
Unless you mean you cannot open it from different application?
I'm working on a web project but the scenario has some restrictions for a specific user case. We have been investigating a web-only solution and a dropbox-like native way to solve this.
The main restriction is that we shouldn't upload local files to a cloud. We can only track local URI's.
The use cases are:
As a developer, I should be able to link the URI of a local file to a webapp. Thus, I can click on a webapp element and the local file should be opened.
As a user, I should be able to add a directory and view the same structure on the webapp (clicking opens the file). The files are not uploaded.
Possible solutions:
We started trying the FileSystem API but when the specs. were fully defined, we figured out that a local sandbox was not enough, and we can't access to the local URI due to security issues.
We are considering a Dropbox-like native app. The Invision Sync App is closer to what we want.
The less optimal solution would be a complete native application.
The question:
Which is the more efficient way to achieve this? Any idea on some native libraries for doing this faster? Any web-only workaround?
Thanks in advance.
I am trying to learn iPhone App Development using MonoDevelop and C#. I have created a sqlite database file userinfodb_v1.sqlite and placed it in a subfolder called Data in my project. Now I am trying to write the connection for the application to fetch data from the tables. I haven't got much clue as to how I should form the connection string as I have only about started. This is what I am doing:
string strconn=Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Data");
scon=new SqliteConnection(strconn);
scon.Open();
However this is not working as the connection is failing. What should I do to establish a connection? Where is the error in my code? Can you help me correct it? Any help will be massively appreciated. What does Environment.SpecialFolder mean? Where should I keep the database file in order to access it properly?
Many Thanks in anticipation.
When your application starts you need to copy the database file from the bundle to the Personal folder.
I have a custom developed share dashlet that has hardcoded values in use (For example the name of a Workspace to use as a default).
I would rather have the values placed into a configuration file and have the dashlet read the fileup at server start and work from there. I have two questions:
Which file can I use and where can I place the file?
How can I get the share dashlet to read the file contents and load the data into local variables?
I would advise you to leverage the PreferenceService, which can be accessed from a Share Web Script by consuming the following API exposed by the repository:
GET /cms-repository-5.0.0/service/api/people/{userid}/preferences?pf={preferencefilter?}
POST /cms-repository-5.0.0/service/api/people/{userid}/preferences?pf={preferencefilter?}
DELETE /cms-repository-5.0.0/service/api/people/{userid}/preferences?pf={preferencefilter?}
In this way you will probably need to define some hard coded meaningful defaults, then let the user customize his experience and store the customized settings as user preferences.
I'm helping a friend transfer a site to a new server who uses Actinic to run a small catalogue of items.
I've transferred the files over to the new server, but I need to change a few configuration settings for Actinic, as the old server stored files in
/public_html
But the new one uses
/httpdocs
Does anyone know which files I need to edit to do this? I can't get in touch with my friend at the moment as he is on holiday.
Any advice appreciated.
Thanks.
Are you referring to Actinic, a company that makes e-commerce solutions? You do not specify which product you are trying to use, but since this is a commercial product, I would suggest simply contacting your vendor or service representative.
It's just a case of changing Network settings in Actinic Application. I'm not sure if you can just copy files from one server and put them into another. It's highly unlikely this will work. Also check if new host is compatible with Actinic. A lot of Actinic websites use secure connections.
Actinic boils down to 2 folders -
CGI-BIN
acatalog
Images and site files go into the acatalog folder
Pear files etc go into the CGI-BIN folder