Running json files on the apache http server (localhost) - json

I am trying to put a json file on a localhost to call later on my app.
How do I put the Json file on to the Apache http server to call later?
I am new to Apache http server and back end in general, I am sorry if this question is ambiguous.
I tried to look up similar questions on stackoverflow..but I just could not find any.

Just put the File into your htdocs directory. You can access it by entering in your local Browser:
http://localhost/myfilename.json

Related

How to set a api endpoint for json in windows?

I am looking for a solution to set a api end point for the json file in windows. This json should show the updated value whenever it get updated.
Can anyone help to suggest for the right approach?
Thank you
there are a million ways to do it (nginx, apache httpd, lighthttpd, IIS, even a simple netcat server could do it, to mention a few), but
the simplest way i can think of is to just host the json file from HFS
(a simple HTTP file server that runs as a single stand-alone exe, and requires no installation, and is free and open source)

Posting an (Image-) URL of a file from Fileserver and Associated Data as JSON via HTTP

I have developed a Node.js & Express Application that sends data as JSON.
Part of the application requires to send the Location of image files stored on different file servers (Windows Server 2012).
Currently the Node.js Application are delivering the file-location in a format like
[{"MulPfadS":"M:\\Originalbilder\\fos\\EID","MulDateiS":"EID00124","MulExtentS":"jpg","ObjId":178983}]
Now the customer wants the location of the file in a format like
http://10.9.0.11/path_to_image
There are no Webserver running on the file servers and the customer doesn't want to copy the image files from the file servers to the same server where the node.js application is running.
Is there a way to resolve this issue? And if so how?
You could convert the image as base64 encoded string and transfer across.

Http POST for loading a mock json file

I have an application which hits APIs on the server. But the server isn't developed yet so I am using mock .json files on my local machine to proceed with client side development (which uses angularjs). Some of the APIs need to send POST requests (example: login). When I send POST requests to hit my mock .json files it gives me 400 status error. Is it possible to request .json file with Http Post method ?
I don't think you can use POST on local file only GET. One solution is to host your own server and mock from there. There are also website that help you do this for example Owllang

communication between flex AS3 and asterisk server?

I'm trying to upload a file using Flex to an Ubuntu server running asterisk. The server-side upload code looks correct; when I test it locally it successfully uploads the file to the server.
When I deploy the solution to our main server it doesn't upload the file. Debug mode shows an error: crossdomain.xml could not be found.
I have a crossdomain file, but I don't know where to put it. The main server is at 192.168.1.143, and the Ubuntu server is at 192.168.1.137.
After some reading I found it should be accessed from 192.168.1.137:8088/crossdomain.xml.
Where do I need to put the crossdomain.xml file on the Ubuntu server?
The crossdomain.xml file will be search on your webserver main page, which is on port 80 of the server you're trying to connect.
If you're using Apache, lighttpd, or others, and don't use a VirtualHost, chances are your must put your file at /var/www/crossdomain.xml.
You must be able to access it using http://192.168.1.137/crossdomain.xml, without any port indication.

pushing data to local .json file via $http service in angular?

Is it possible to push data to a local json file stored in my app folder using the $http service?
I've tried fiddling around with $http.post/.get and can't find a way to save/push new data into my local .json file.
Javascript is a client side program and therefore has no ability to modify files on your server (if you're just playing with directories on your local machine, for all intents and purposes, the local machine is your server.) Its only concern is client side logic. You need some type of server backend to do this.