Getting data from backend and sending data to databse through node.js - javascript

I'm working on the front end of an application, the backend has been built in Spring Boot and MongoDB, I want to use a javascript library that provides chat functionality sockets.io and from examples I've seen, generally mongo is accessed via node and express. So what I was thinking was, getting usernames and such from the spring boot backend and then send data to my database (the messages) through node and express. Is something like this doable/recommended?

Related

How to send data from an Electron.js app to a remote server/db

As the title states, I'm having trouble finding a way to send data from an electron.js app to a remote db/server.
I can use mysql to connect directly with a database but it doesn't strike me as a secure thing to do. I would like to send the data, probably a json string, to a php or js file on a server and handle the validation and database access there.
I'm very new to working with node.js and electron.js but I'm really excited over the possibilities of it.
Have you got a working web server?
I'd recommend express - it's fairly simple to get started. You could define a route that you could post your data to, and then that would in turn add it to the database.
You can make a standard AJAX request from the browserWindow of your Electron app. Please refer to this question:
javascript ajax request without framework

Mongodb to Android Application

I want to connect android application to Mongodb. I had installed Mongodb into my system but i don't know to connect with android.I tried mongo with java applicaion.can you help me?
It is a very large question but,
The best way to achieve this is to create a restful webservice to access your mongodb database and also respond to clients with that service.
There are lots of choices to pick a framework for your restful webservice however, you can use Jersey because of its ease of using.
First, deploy your jersey application as your backend application to
your localhost or to some remote hosting provider as y.
Second, make http calls to your backend and fetch the data from
mongodb in json format
Third, parse the json formatted data in your android application and show it on your layout.

Connecting with MongoDB in Javascript without NodeJs

I have an UI5 Application [Mobile-Fiori], and I would like to connect it with MongoDB to get JSON data to be displayed in my views.
I know it would have been possible if I used Node.js with the package Mongoose, but for my applications developed locally, I use Eclipse with Tomcat Server.
I wonder if this is possible in this way.
Thanks
Yes it is possible, e.g. with Spring Data MongoDB.

Run javascript on rails server side

I have a rails app which is the REST api. Part of the models i have are javascript scripts that the users are able to upload.
I want to create a background worker task where i can make a network request and execute the javascript on the result of the network request server side and then save it to the database.
Now i have been told to consider using a Rails front end api and then use a NodeJS server for being the workers and executing javascript.
My main concern is developing a cross platform schema with nodejs orm and rails orm.
So my question is twofold is there a way of developing the database schema so it is in sync across both the Node JS server and the Rails server. Else is there a way of executing the javascript on the rails server?
You can use https://github.com/balderdashy/waterline or https://github.com/sequelize/sequelize or https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Shell to access same database as Rails app from Node.js app but make sure that you are only reading from database using Node.js not writing

Create a form with phpMyAdmin on backbone

I would like to know if it's possible to connecting a form to database (phpmyadmin) with Backbone ?
It's just to add emails newsletters.
Tks :)
PHPMyAdmin is not a database. It is an application used to access MySQL databases via a browser-based UI.
There are MySQL libraries for javascript being run from a server (like in node.js), but you do not want to be connecting to a database from your client. You would need an intermediary web service.
Running from a client would be extremely foolish in that you would a) have to open up database access from potentially any remote host in the world and b) you would have your database login credentials exposed to your clients.

Categories

Resources