This question already has answers here:
How to use nodejs in google firebase hosting service?
(3 answers)
How to host nodeJS project to firebase?
(2 answers)
Closed last month.
not getting hosted
main directory
inside public folder
I have followed every step in order to deploy the project through firebase.
I have even included the copy of all the files inside public folder but I am not able to see my app getting hosted .
I think I am making some mistake regarding the location of files
I was trying to host my project through heroku so I had made some changes from there like I switched the port to
app.listen(process.env.PORT || 3000, function () {
console.log("our server is running on port 3000");
});
and adding a Procfile , inside which I have written
web:node app.js
I am just a beginner to web dev , So I am unfamiliar with a alot of things , I think I have made a very silly mistake here
Related
I have en existing app (e.g com.company.app1)made in Unity, that occasionally pulls content from firebase in the live environment (after being built).
Now I am trying to make a second build, with a different project id (com.company.app2). This second build does not use firebase after being built - it loads data from firebase before being built, and therefore already contains the needed data.
I have added com.company.app2 as a second android app in my firebase configuration, but when trying to install the resulting app2.apk there's a clash between it and the existing installed app1.apk.
Below is the error Unity is showing when I press it's "Build and Run" button.
stderr[
adb: failed to install C:\Users\*\*\*\*\app2.apk: Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.:
Can't install because provider name
com.company.app1.firebaseinitprovider (in package com.company.app2) is already used by com.company.app1]
]
My question is, how can I change the provider name in app2 so both app1 and app2 can coexist on the same device?
(I need to interface with firebase shortly before building, so I can't just remove the SDK).
Alright, so I ended up just removing the SDK, that works.
Sorry to anyone who has some similar problem.
This question already has answers here:
Get code from firebase console which I deployed earlier
(6 answers)
Closed 1 year ago.
A time ago i've created functions (API) on my firebase, i would like to add more but I don't have the files locally, neither on github.
How can I get them from the firebase server?
You can download the source of the scripts from Google Cloud Functions:
https://console.cloud.google.com/functions/list
You can then access each function independently here.
This will take you to a window with several tabs.
Click the SOURCE tab and then Download Zip
*Depending on your build, it may be missing some components and modules but it is a way to recover them in a practical manor.
This question already has answers here:
How to access data/data folder in Android device?
(18 answers)
Closed 4 months ago.
I want to have an SQLite db in my flutter app, so i followed this flutter cookbook: https://flutter.dev/docs/cookbook/persistence/sqlite
I open the database with the following path: join(await getDatabasesPath(), 'doggie_database.db') exactly like the tutorial. I ran the app on my Android phone (not emulator).
Now i want to inspect the database file on my PC, but i cannot find the file on my phone.
I debugged the above statement and it resolves to /data/user/0/*mypackage*.*app-name*/databases/doggie_database.db, but i can't find the folder /data (only Android/data) or the file in my file manager neither on my phone nor on my pc.
Where is the file and how can i extract it from my phone?
I found the solution that works on Android. It is possible to extract the database file by using adb.
Connect the phone via USB
use the adb shell
type run-as *mypackage*.*app-name*
you are in the /data/data/*mypackage*.*app-name* folder
cd into the databases folder
copy the database file (i.e. cp doggie_database.db /storage/self/primary/Documents)
Use these 2 articles as reference:
https://denniskubes.com/2012/09/25/read-android-data-folder-without-rooting/
https://blog.shvetsov.com/2013/02/access-android-app-data-without-root.html
In the case of iOS simulator,
you can easily find the sqlite database storage location with the following code.
getDatabasesPath().then( (value) => print(value) );
flutter: /Users/*** your name *** /Library/Developer/CoreSimulator/Devices/4769664D-2588-4E47-A29F-5CD9DB801595/data/Containers/Data/Application/3F53C2F3-687C-4E3D-8611-66A6D8BFC84B/Documents
This question already has answers here:
Can you call out to FFMPEG in a Firebase Cloud Function
(7 answers)
Closed 2 years ago.
I want to use ffmpeg as described here:
https://github.com/firebase/functions-samples/blob/master/ffmpeg-convert-audio/functions/index.js
ffmpeg-static contains binaries. I am using Windows 10 and want to upload the code using firebase deploy.
However I do not understand what I need to do to get this to work. The binaries that will be installed on my PC are of course different from those needed by the cloud firebase (https://www.npmjs.com/package/ffmpeg-static).
How can I do this?
When you deploy Cloud Functions, the deployment process doesn't include the contents of node_modules from your local machine. Google infrastructure will effectively run npm install for you and rebuild the entire thing in an environment that matches your target Cloud Functions runtime. As such, you will get the correct binaries with your function. It doesn't matter that you developed on Windows, and there is (in theory) nothing you have to do to get the function to work, as long as you wrote platform-independent code.
If you have a specific problem, your question should show what, including any code and error messages one would use for debugging.
on meteor i've just added a new feature to download some image in public/img/aSpecificFolder.
It works locally, but i've seen that each time i deploy on meteor.com using deploy command, it looks like that public folder is completely erased. Or maybe that the deploy remove the current app and install a new one. So it only keept the connection to db but all files are removed and put again.
What is the good way of doing if i want to store image on meteor.com ?
thanks
Have you considered using something like collections-fs. When you deploy on meteor it will clear your previous app and use the new one.
If you use something like collections-fs it lets you store your files in the mongo database instead, so they're not actually on the same server that serves out data.
This is also good in another way (scaling) since each virtual environment that hosts your app is able to access the files. If you store the files statically they will only be accessible on one of the servers.
For the moment meteor hosting (via meteor deploy) uses one server, but its likely it will be scalabale in future.