how use postgresql with javascript? [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am new in JavaScript and i want to create a page which store data in database so please help me and suggest me what i read regarding storing the data ?

If you only have little knowledge of Javascript and you're trying to have persistent data, I would recommend looking into localStorage and sessionStorage for the user session.
If, on the other hand, you're looking into storing data to a proper non-volatile database like PostgreSQL, but still has got only a bit of Javascript knowledge, I would recommend Meteor.js, which is a full-stack Node.js (javascript) framework and is very easy to use.
It does use MongoDB by default instead of PostgreSQL, but for prototyping does the job perfectly.
Have a look here https://www.meteor.com/

Related

Firebase with JavaScript [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
How to secure firebase code,I mean can anybody edit its code through google chrome console like view items or other things or there is any thing to prevent it?I am fairly new and only now the basics.
Your firebase code is sitting with the rest of your website code. I do not believe there is any major issue unless you are using a client side rendered framework for your web application and have left your configuration keys for firebase in the frontend and on top of that your firebase access rules are set to public. Setting the proper firebase rules - you may want to read this: https://firebase.google.com/docs/database/security/
is most important. This applies to all Storage, Database and Authentication.

Get a document from MongoDB and place in an html form [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Could you please suggest me what functionality I should use to get a document (containing a few lines of text) in a MongoDB collection and place it in an html form using JavaScript/Angular?
So, first I need to query the MongoDB from inside an angular script. Is there a simple way to do this, like for example in python, using pymongo to connect to a database?
And second I need to place the output of the query to an html form. Seems easy, but are there any bottlenecks I can face?
Sorry for silly question - this is my second day of web-development
Firstly for getting data from database you need to write server side code. You may write it in nodejs or any other language of your choice. Then in that code you have to make query to database and expose that data using REST apis. Then inside of your angularjs application you will have to consume that rest API and then show the data onto the html page.
Happy learning. Cheers!

Search large data in the react native list-view [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have 9000 offline records in the list-view of react native app,I want to add search filter without affecting performance of the application .Please suggest me what approach I should adopt to search the large local data.
If your really need great performances, you should try Realm Database.
Maybe it's not a proper answer because you are not asking for a new DB mechanisms but I think it's the way to go.
However, a React native version is out (V1.0) and do a better job than AsyncStorage. Then you can make very complex queries like SQL and handle relations betweens datas.
More informations and benchmarks : https://realm.io/news/introducing-realm-react-native/

how would I build a comments box? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm interested in creating my own comments box for my website. I want it to be very similar to facebook's commenting system. How difficult would this be and what language is the best for something like this? Also, could someone point me towards some documentation that would help me learn how to do something like this?
Using Rails for the back-end, but could build the box with php preferably using heroku or mysql databases.
If you want to create comments box like Facebook, then you will have to use some server sided scripting technology like PHP, Servlets or any other which does the same thing as these do.
And you will also have to learn DATABASES like mysql, Oracle, Microsoft SQL, etc.
Since these will be used to store comments and retrieve Comments.
My suggestion will be use PHP And MySQL because they are free to use and you can learn these from W3Schools.com.

Example Sign-up/Sign in using node.js [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm new on using node.js
Surfing around the web i couldn't find any example of code of a simple sign-up/sign-in that could also show me how to manage database in node.
I mean the app.js page for server and the related client-side html page, and their relation. Can someone help me or give some useful link i couldn't find?
using Cassandra and i.o. socket, it'd be the best help.
You can use Passport library http://passportjs.org/ , there should be an example there. You can also use https://npmjs.org/package/passport.socketio if you want to login by socket.io
I recommend using http://passportjs.org
It has support for simple username/password authentication as well as OAuth etc
http://passportjs.org/guide/username-password/
There's also a good tutorial here:
http://danialk.github.io/blog/2013/02/23/authentication-using-passportjs/

Categories