I am using sails js with mongodb.I need to implement push notification for android and ios. how can i implement it. I searched lot of things in internet regarding push notifications in sails js but i didn't find any useful resources for implementing push notifications in sails js. I tried node-push server but didn't get how to configure node-pushserver in sails js so can anyone please help me with this.
Got an answer for my above question on git hub by Maxime Robert.
Here i am pasting the answer just because it might be useful for others who are facing the similar problem.
Hi,
node-pushserver is NOT in sails.js and shouldn't be hard-linked to any other
development.
It is meant to be used as a standalone application requiring node.js and
mongodb as dependencies.
Your application should only interact with node-pushserver via its REST API.
Related
Ok, so my question is actually a bit more complex.
I know how to develop Node.js apps using Express.js. I also know how to build React apps. The problem is putting it together. I've seen many tutorials do it, but they just use the Express backend as if it was an API.
I don't know if this is the best option, but I'd like to have my Node app, and then in the frontend add React. The main difference is that when it comes to handling the URLs, it will be Node who would do it. Therefore, if Node is on port 3000, you would have to go to localhost:3000 to access the website, opposite the guides I've found online.
I would really appreciate some help, as well as other resources as documentation or videos online.
NextJS seems to be a good approach for your situation.
It binds a Nodejs backend with a react frontend with an intuitive developer experience.
It has middleware, handles server-side rendering, code splitting, and routing for you. It also provides a development server that allows you to run your application on a specific port (e.g. 3000) and handle the routing on the server side.
You can serve the react build folder from your node server.
Check this link
I am trying build an application that can run offline and online too. If the application is offline it must run with minimum functionality and if it get an internet it automatically push data online Any references or tutorials would be appreciated.
any references that can help me to achieve this.
Yes, surely that's possible and you already mentioned the tools: node.js and electron are suitable. Most electron apps do that (whatsapp and joplin directly come to my mind).
You can look in the source of those already available apps, but it might be difficult. I would start with the tutorial of electron and search for the features as "check internet connectivity" (i.e. here on stackoverflow)
Your question is a bit to broadly stated to help in detail.
Yes, surely that's possible. you can use the node.js and electronJs with Angular are suitable.
For Angular and NodeJs refer the below document:
Build a Basic CRUD App with Angular and Node
For ElectronJs refer the below demo project:
Electron Samples
Best luck !!
I am getting so much problem in creating a next.js app with express and firebase-authentication and what is the use of redux here.can anyone Please Help in this stuff or provide some tutorials because next.js documentation is not worthy and examples are too not worthy.
The example with-firebase-authentication in the NextJs examples folder is not working right now:
See my bug report: with-firebase-example-not-working
I'm trying to do this using service-workers since it's supported by Firebase:
firebase-docs-to-service-workers
I've been looking at a NextJS example with service-workers:
nextjs-example-with-sw
But I found that the sw-precache webpack plugin is deprecated by Google and they recommend to migrate to the sw-toolbox see here: google-sw-toolbox
But have in mind that this adds an overhead of sw configuration and registering/un-registering as well as the scope on the sw in your app.
To learn more about service workers check google-dev-docs
I'm trying to develop an application in phonegap/ionic and I want to use a remote database to store my data. I want to use MongoDB.
I already tried lots of ways such as this quick start guide.
By using this I can connect to DB but this is pure node.js and the require() function cannot be recognized when I try to add this code to an ionic starter app. Maybe require is not supported in ionic
Is there a way that can achieve it in Ionic?
Please let me know if you want some more information.
The thing is; you can't connect Ionic to MongoDB directly. No, there's not workaround, no magic involved, it's just not the way this is supposed to work. Ionic works on top of Angular and Angular is a frontend framework.
However, the way you should do it is that you basically create a (RESTful) API on your server side.
Most likely this will be made with Node.js which will talk directly to MongoDB and query it. A framework very well suited for this (you actually may be using it already) is Express.
After you write your (RESTful) API then you can consume it through your services in Angular by using Angular's $resource object.
Sure, this is not a step by step answer, and it seems you're just starting in this area, so you have some learning do to on your part (REST, RESTful, $resource, services...), but I wish you good luck and if you'll have any more specific questions, don't hesitate to ask them.
I just found out about sails.js and i think it's really awesome. I want to build apps with sails and angular, but i haven't found any guides on doing this. I found this site which is supposed to have a talk on using sails.js instead on express in the mean stack, but there's not video there.
I would be glad for links to videos or blog posts on how to do this.
Thanks all.
This is getting downvoted because its not a direct question about code.
I have a boilerplate sailsjs app that you can use to model your own off of..
https://github.com/mikedevita/sailsjs-v10-angularjs-requirejs-boilerplate
This is based on v0.10 which is in beta right now, but the same concept applies.
I've created a simple yet powerful angular service, published as a bower component: https://github.com/diegopamio/angular-sails-bind
It basically:
Creates the model inside the $scope for you.
Retrieves the model data from the backend using socket.
Watches for changes made by the user in the UI and updates the backend immediately.
Watches for changes made in the backend and updates the UI immediately.
And it does it with just one line of code in your angular app, like this: $sailsBind("", $scope);
I made it as part of a personal project and then I decided to publish it as it could benefit others. It works with sails 0.10. Let me know if it suits your needs or if you'd like to see something else on it.