Vue router to serve a json file [closed] - vue.js

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 1 year ago.
Improve this question
I need to render/serve a json file using vue router for https://mysite/apple-app-site-association. I don't use webpack and the app is hosted as azure static web app. I want to return content-type as application/json as well. I'm using Vue 2.6. How do I do this?

It will depend a little on how you are serving your web pages on Azure but I did the following on AWS, which has virtually nothing to do with Vue.
Created a new folder in my public folder
Added the json file to the new folder
Deployed my app (which creates the folder on the AWS host and puts the JSON file in it)
Configured my host to override/bypass my Vue SPA and serve the JSON file for a particular path (in my case AWS cloudfront).
I could have manually added the JSON folder and file to my cloud host and configured it to serve the JSON but I wanted an automatic deployment. Sorry I can't help on Azure but I hope there are similar concepts as cloudfront on AWS.

Related

NuxtJs Build SPA on Nginx server [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
i want to deploy my Single Page Application on my Nginx server
so i run
npm run build
and i uploaded the dist folder to my server, and it works fine with the static pages, but if on the dynamic pages that have a dynamic url i got the below error
ERROR 404 - PAGE NOT FOUND
can you please help me with this.
Your webserver is not aware of the routing inside your Vue application, so you'll need to have Nginx point all requests to the application to the index.html and after that Vue routing will take over. The documentation can be found here.
The required configuration snippet copied from there is the following:
location / {
try_files $uri $uri/ /index.html;
}

Server fault issue [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am trying to link to a specific page within a PDF.
For desktop the URL works with:
https://www.examsolutions.net/papers/edexcel/gcse/nov17/paper2/paper2QUE.pdf#page=3
It takes you to page three, but does not work on mobile. However if I use jQuery
if ($(window).width() < 600) {
$("a").each(function(){
var newUrl = $(this).attr('href').replace('page=', 'page');
$(this).attr('href', newUrl);
});
}
The URL is changed to:
https://www.examsolutions.net/papers/edexcel/gcse/nov17/paper2/paper2QUE.pdf#page3
The removeal of the '=' works, but only on iOS. Is there a solution for Android or is it not possible due to Adobe PDF licenseing etc?
Option A is fine - do that.
It depends what the set up is on your new hosting...
If you have cPanel you can add the old domain as a parked domain - takes 30 seconds to set up - then just point your name servers/DNS the new hosting.
Alternatively you can set up the old site on your new hosting, then do a 301 redirect in the .htaccess file pointing it to your new domain.
http://css-tricks.com/snippets/htaccess/301-redirects/
Thanks for all the helpful guidance, I took it all on board and thought I would post back what I actuall did incase someone else needs a breakdown. To be clear, my hosting is a VPS on a LAMP stack running Ubuntu.
Repointed the a-record of the old site to the new one.
Created a config file in the sites-available folder of apache2
Pointed that config file to where I wanted the hosted folder to be,
in my case home/www/vhosts/
Created a folder in the above in the name of the old website
Added the .htaccess file in that folder with the 301 redirect in it.
Made the website active my using the a2ensite command
Restarted apache

How to let Dropbox treat symbolic link AS IT IS? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
If I create a symlink inside Dropbox folder, pointing to another file also inside Dropbox folder (say, to maintain certain directory stucture), then Dropbox will try to de-reference the symlink and treat it as an normal file, instead of syncing it as a symlink. This could be very frustrating sometimes since I don't want to copies of the same file.
So my question is, is that a way to let Dropbox sync symbolic link just AS IT IS?
In the cloud the directory structure is not the same as in your computer. Therefore there is no way it will synchronize the symbolic link as it is.
In your computer, the link points to the absolute path to your original file (or folder). It looks like the following:
Original folder path: /Users/username/home/Documents/Dropbox/MyFolder/
Symbolic link: symlink -> /Users/username/home/Documents/Dropbox/MyFolder/
Since the cloud can't point to this same directory structure it will de-reference it and copy your files (on the cloud) all over again.
Links are great in Dropbox when it points to something outside your dropbox folder.
This way the outside files will be copied to the cloud but wont be copied in your computer.
UPDATE:
On the matter of relative symbolic links, I guess Dropbox can't sync as it is because your dropbox directory structure may be different from your colleagues.
For example:
Your structure: Dropbox/Projects/
- coolfile.txt
- SharedDirectory/
Your friend structure: Dropbox/SharedDirectory/
Relative Symbolic link inside SharedDirectory: link -> ../coolfile.txt
The link will work your structure but not on your friends.
UPDATE2: links inside Dropbox are also being used to share content from within a shared folder with someone outside that group.
I've tried doing what you are trying to do. No luck. At the moment there is no way to get dropbox to sync symlinks properly.
However, there is a feature request exactly about this. So cast your votes on the request and hope for the best.

Amazon S3 file upload via torrent [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I know that amazon-S3 supports BitTorrent and that we can download files using a torrent client. My question is,
Is it possible to upload files from my pc to s3 via torrent, either directly or using ec2 ?
Note:
I have a website where users upload large size video files which are stored in S3. It would be helpful if they could just upload a torrent file so that they can seed whenever they want and also have multiple seeders for the same file which decreases their upload time...
You'll have to install a BitTorrent client on EC2 (or on your own system), download the torrent file, and upload it to S3. S3 does not natively support fetching BitTorrent files from other sources and storing them in a bucket.
you can set a PUBLIC s3 file as downloadable by torrent if you add ?torrent at the end of the url.
For example, I just now uploaded following file:
http://mybucket.s3.amazonaws.com/Install/hexagon4.png
if you set the link to
http://mybucket.s3.amazonaws.com/Install/hexagon4.png?torrent
it will be downloaded as torrent.
I don't know if this is possible to do for closed files

How to transload a file from URL to Amazon S3 [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a 7GB file I need to download and store in a S3 bucket.
Can I transload it directly to S3 without having to download it to my computer?
AFAIK this is not possible. Here's another to confirm this: Is it possible to upload to S3 by just providing a URL?
You can make it appear that your files are using a different server to be accessed from or uploaded by playing with the CNAME record though: Using amazon s3, upload files using their servers but URL should appear to be from mine
But I don't think this is what you want.
You could however download the file to one of Amazon's EC2 servers and upload from there to S3.