Call Flutter web app from Node js function firebase - node.js

I am building a ticketing application that listens to Gmail mailbox, basically, every time an email is received a new document in a collection should be created that stores the mail body subject and the attachments
I don't have experience in Node js
is it possible to call a Flutter web app page example
myapp.web.app/email-scan
using scheduled cloud function every 10 minutes

Is it possible to call a Flutter web app page example
myapp.web.app/email-scan?
Yes, it is totally possible. Since we use Node.js in Cloud Functions for Firebase, you can, for example, use the axios library to issue calls to an URL.
Here is an example: Calling a 3rd party api through a cloud function in firebase with AXIOS POST

Related

How do i add a node js backend to a flutter app?

i am a new flutter dev and I want to understand how to connect a backend of node js to my flutter app. do I set routes and controllers and models like I would normally in a web app?
you can create api endpoint (in server-side) to connect your app with backend
just call api in mobile app with specific parameters.
normal web app usually returns you html page, but you need JSON file only
(sometime you can parse html file to grab data but not prefer).
api that you created (with Node.js/ASP.net/PHP/Python and etc) just return JSON type data and client (mobile app) get data and draw ui or do another operation with it

Combining Vue.js app and Restful API service

Is it possible to combine a Vue.js app with a restful API service?
New to Vue but written my first Vue/Typescript app that is a front end that consumes some public APIs, add extra logic and display results. All works – fine. Now I also want to have my own restful API interface.
I know Vue apps are SPAs, so when I ‘change page’ to myapp.com/page2, it is not fetched from the sever but rather the app just re-renders the display. But is it possible for those routes that are not defined, such as myapp.com/api/whatever, to be a restful interface? That is, consumes requests and return responses? And when hoisted, would a user have access to both a front-end and a back-end, even though the app is running client side?
Did start down this route using express.js but ran into issues as if I was trying to combine chalk and cheese. (Not lease, would need to change the node module to ‘commonJs’).
Would using Nuxt help? Know nothing about Nuxt … yet. Or must I go the traditional way, and write a separate back-end and change my front end to consume it.

Making Firebase and Angular2 project

I'm new at Firebase, I'm starting making a project which has to include Firebase and angular2, but I am such confused about how to implement them. I don't know if a there's the need to have a Back-end implementation (like Java or NodeJs) to handle some security issues (like form validation, authentication, routing etc), or it's enough just implementing Angular2 to handle all these issues. I would be so Thankful about any helpful advice how I could implement these both technologies to build my project successfully. Thanks
first firebase is something like your backend firebase can safe get and send request as your backend apps...
and angular js will do the rest like you just said andd all the backend stuff you can handle by firebase :)
This is my simple explanation on how this 2 works together
Always keep in mind that Angular works only in front-end. Its domain is the look and feel, application events, sending data to server and anything else that has something to do with displaying data is coded in this area.
Backend services in the other hand interacts with your database, creating business logic, handling authentications, saving / sending of data and other stuff that interacts with the database is coded from here.
Now how these two interact is done by the frontend service to send HTTP requests to the Server which is the backend service. This is done by using Angulars $http service or the so called jQuery AJAX or the infamous XMLHttpRequest JavaScript native. New technologies today utilizes Web Sockets which is being used by Firebase and some other frameworks, Web Sockets offers a faster way sending / fetching data from server.
The server then interprets the data being sent and send appropriate response. For example getting user list, saving profile, getting reports, logging in, etc.. It would work in this workflow.
1) Angular sends http request to server to get list of users.
2) Backend service installed in the server then interprets the data being sent.
3) Backend service then gets list of users from the database.
4) Backend then sends the data back to the frontend service.
5) Frontend then recieves server response and displays the data to the view.
Also these two is coded separately. To have more detailed explations research about how frontend and backend services interact you can find so much resouces in Google.

Using Twilio with Meteor to respond to SMS

I have recently started learning how to use node.js and Meteor. I am trying to create a small app that I can query via a client built in meteor, but also query that same MongoDB via SMS using the Twilio API. I can see that this can be done with Express: How can I respond to incoming Twilio calls and SMS messages using node.js? but I wanted to use Meteor because of its apparent ease-of-use and integration with a database. I've been reading various questions about routing templates and serving static html pages in Meteor, but is there a solid way someone think I can make this work? Should I just go back to plain Express?
Twilio expects you to give them the URL where the XML response will be hosted: http://www.twilio.com/docs/quickstart/php/sms/hello-monkey
My earlier response is outdated. Today one should use iron:router and create a server-side route.

Nodejs Restify Collection/Array param

I am in need to send multiple items over rest web service being developed over Nodejs + Restify. I can send single object e.g. User.
Suppose, my app got 10 - 100 users at once and want to upload on server via Restful web service developed in nodejs/restify. What would be good solution for this?
I managed to do that through a jQuery Ajax Request. You can see my post for the solution.
Post jQuery JSON Object to NodeJs Restify
You can put you array in a Json, and then send it to your web service in one url parameter using JSON.stringify(your json)

Resources