Saving data from a chrome extension to a local database [duplicate] - database

I am building a chrome extension which will only be available for people within the company I work for.
The extension needs input - which can be generated with a simple query to a shared MySQL DB server (to which all employees can access with read only permissions).
The question is - since the extension is all client side (mainly Javascript) - what's the simplest way to access the DB and run the query? Do I have to create a php/java(/...) service which does that for the extension?

You'll have to create an intermediary web app that will interface with the Database. Then you can make AJAX calls from the extension to your web app's API, which will in turn query the database and return results.
Chrome Extension → Web App API → MySQL
More info on Chrome AJAX API here

Related

need help extracting data from a local .mdf file and send it to my flutter app

i am building a test app that will display all the sales made by a shop. this app will be built with the flutter framework, i do not have any problem when it come to front-end, but as of the back-end side of the app i have no idea where to start. i will handle client auth with firebase. i have a test .mdf file filled with test sales numbers and dummy customer data on a separate machine running windows server 2009 r2. My question is whether there is a way to fetch data from that file that is in that server and display it on the app. i have no background in the backend so i will need a thorough explanation on the coding languages and technologies that i will need to use. thanks in advance
i ended up creating an api using nodejs, i made a config file and gave it the db properties as of the username and password i was able to connect to mssqlserver using windows auth and i added a user to give to the config file in the api, i then used ngrok to deploy the running api on the internet and that is what i am using to show the data on the app

Using a large API via custom connectors. API's definition exceeds the 1MB file size limit

The company I work for uses a product named Pension Pro for workflow management. They offer an API and we would like to look into using it for automating tasks and connecting multiple systems. We want to do this through Azure Logic Apps and/or Microsoft Flow.
Pension Pro provides documentation for their API on their website here: https://api.pensionpro.com/#/
In theory, I should be able to save down the API documentation from their website and import it into Azure. The issue is, once saved to a text file, the API exceeds the 1MB file limit for importing an OpenAPI file.
I tried copy/pasting the JSON data into the swagger editor inside of Azure and ran into issues when saving the connector as well.
What would a solution to this problem be?
Another approach would be to use the Azure API Management Built-In Connector.
You can import the OpenAPI spec into APIM and then use the built-in connector to call the operations directly from Logic Apps.

Permission denied on external access to Google Cloud Datastore

I want to access datastore (and storage) data of an AppEngine project via google-cloud-datastore and google-cloud-storage with an Python program on my own server.
This works with my AppEngine staging server, by creating a service account and giving it owner access (to the project).
Doing the same thing with the production AppEngine instance fails with
google.api_core.exceptions.PermissionDenied: 403 Missing or insufficient permissions.
Part of the problem might be, that I might be using the wrong project to create the service account with. There are more than one project with the same name in my cloud console. How do I identify the correct one?
How do I get more details about the problem?
First, note that the Datastore and the Cloud Storage are 2 different products with 2 different accessing methods.
The Datastore is closely tied to the GAE project - each project has its own datastore. The external access procedure in general is captured in How do I use Google datastore for my web app which is NOT hosted in google app engine?.
When switching the project (staging to production in your case) there are 2 things to keep in mind:
as you observed, you need to change the project you're accessing.
you also need to change the credentials you load and use for access to match the project you select, as each project has it own service account key configured in the above-mentioned procedure
For the google-cloud-datastore library both of these are simultaneously configured via the datastore.Client() call parameters (emphasis mine):
class google.cloud.datastore.client.Client(project=None,
namespace=None, credentials=None, _http=None, _use_grpc=None)
project (str) – (Optional) The project to pass to proxied API methods.
credentials (Credentials) – (Optional) The OAuth2 Credentials to use for this client. If not passed (and if no _http object is passed),
falls back to the default inferred from the environment.
The Cloud Storage is completely independent from GAE, the GAE project/credentials you use (if any) have no bearing on bucket/object access restrictions whatsoever. There's nothing you need to do from the google-cloud-storage library perspective when switching from one GAE project to another
To eliminate the confusion created by multiple projects having the same name just go to the IAM & admin Settings page, select the respective projects from the drop-down list on the top blue bar and rename them using meaningful names (click in the Project name box to edit the name, then click SAVE). Then re-check if you're using the right keys for the desired project.

Ionic app connection to SQL Server database

Basically I have a mobile app that I am building in Ionic (3 I believe). I have a website that I built a while back in C# using Visual Studio. The site is attached to a SQL Server database. This Ionic app I am creating is to go along with said website.
My question is how do I connect my app to the same database. I'm very new to Ionic and I cannot seem to find any answers online. I have found some vague SQLite stuff but that is about it.
Not necessarily looking for specific answers in code (although I wouldn't say no). If someone could even breakdown the steps I'd need to take then I can go and research it myself.
Thanks in advance
You can connect to mysql database with your ionic app using Webservice in c#.There is no need of SQLite for connecting your app to sql database.It can be used as local storage instead.Ionic use json data to access.So the data you retrieve from Webservice must be Json.
It depends
Do you wish to directly access SQL database from your ionic app or you want to have access to the database via api.
1. Directly connect to SQL database from ionic application using Cordova plugin.
Follow this link for more info -1

Server for app and website

I am a begginer when it gets to back-end development.
I already have a front and website (html cuss javascript) and I am considering to make an app version of my website.
My website is a multi category blog.
I had a problem of understanding how can I connect a server to my website AND my native app. I know basics of php.
I read articles and q/as , all I could understand is that mobile apps and website use seperate server.
Web server and application server
-- -- is there a way to make a server for both, or is it better to use seperate servers?
-- -- if I use seperate servers for seperate platforms how do I make them show same content without changing it on both servers ( one database for two?)
-- --I heard about a system of creating a main database and a copy of it . Then I sync the copy to the main. How do I do that.
-- -- are there any doc's I can read on this subjects:
1) server for all platforms
(browser,ios app, android app)
2)databse system for seperate servers
From my general experience and the most basic solution, you have a single server in the backend which houses the database as well as the code required to fetch data from the database and supply it.
For example assume that you wrote a function called fetch all users that fetches users from the db and gives back a list of users as its results.
Now irrespective of which platform you are on, you would be able to call that function fetch users and get the data back, if you're on a mobile app, you would need to make an http request to that function, if you're on the web ie, front end you would be making an ajax request. So yes all your code is in one place in the backend. You do not need to make 2 servers for 2 different platforms.
P.S. when you code for the backend use a framework.

Resources