I have a simple project in which users fill a survey on a page, and I then have a js function that stores all of the data from the survey in a dictionary. I would now like to append this dictionary to a json file, and then upload this file to a server so that I can retrieve the data for further use on the website
I have heard that I should be using express with node but I'm new to web dev and I have no idea how
Related
I am using React and JS to build a web app that relies on the REST API of a private web service. Using the API, I can obtain a url for a CSV file that contains data from a server process. The url can be used to download the CSV results from AWS to the user's desktop. The URL is of the form...
https://[identifier1].s3.amazonaws.com/[path and filename.csv]
?X-Amz-Algorithm=[identifier2]
&X-Amz-Date=20210602T001523Z
&X-Amz-SignedHeaders=host
&X-Amz-Expires=3599
&X-Amz-Credential=[identifier3]
%2Fus-east-1%2Fs3%2Faws4_request
&X-Amz-Signature=[identifier4]
(I inserted line feeds above for readability)
My problem is, I don't want the file saved to my local device, I want to parse it directly and read it into a js structure. For example, I would like to display the data directly in a table.
I could download the file and then have the user upload the saved file into the app, but that is not a great workflow. Is there a straightforward way to use the data directly without saving it as a local file?
i'm trying to create a transaction to automatically populate the participants of my network.
I have few experience with Javascript and Json, but my idea is to read an external json file to populate the participants.
Can someone show me how can i read the json file with javascript, in order to retrieve the informations?
Thanks
I need to run my R-code through a website, with the user giving feature values from the website itself, which I have to use as new data for prediction in the R-code. How can I do it?
Have a form on the website which performs an HTML post to a REST api on your web server which will write the information to a database such as MySql, Postgres, MongoDB, or any other database of your choice. Then use a DBMS database management system (DBMS) such as MySQL Workbench, pgAdmin, or Robomongo to query the database and put the data into a csv file, and run your R-code on it. Then use the parameters from your machine-learning model on your server to serve content.
You can expose any R code as a REST API using packages such as plumber, OpenCPU or RestServ. Such an API can then be integrated into the website using Jacascript.
I'm using Node, along with express, Jade and a MongoDB. So far I'm able to query the database and display the data in a webpage.
In the database I am storing PDFs and I would like to be able to download these from the webpage. I can currently get the pdf data in the form of a string (of random character) and display them on a webpage but I'd like to have a button where the user can download it as a pdf.
To insert the pdf into the db I the below python code to open it and pyMongo to insert it.
file = Binary(open(filePath, "rb").read(), 0)
Thanks in advance.
This has little to do with the technologies you mention, but how you handle data on the client. Essentially you will need to utilise frontend JavaScript, HTML and how the browsers handle those in conjunction with data. A pointer would be here https://stackoverflow.com/a/39515978/3580261
I'm new to web development and I'm trying to create a website with a database that will store all the files in the archive with the ability to delete files and upload new ones to the database from my web page.
1)I used HTML, CSS, javascript to create the website
2)MySQL to create the database
and I also tried phpMyAdmin to create the database
but where will I go from there?
How will my website control and show the database?
According to your question, I assume that you don't have a backend for your website. You need to have a backend to access the database. You can use php as the backend to connect with the mySQL database.
PS: I can see that you have tagged the question with php. If you are using php and still you can't connect to the database, please share your code snippets.