How to configure the server in angular to get files? - node.js

I just run the ng serve command and go to the server. But if I drop the file house.jpg into the src folder, then when I access the address http://localhost:4200/house.jpg then I don’t see this file, the main page of the project opens.
I did not find anything about it in the official documentation, I ask the help of professionals

You need to follow the Angular Structure Guide. As said above, you need to put your images and other files you want to use frontend-side in the assets folder.
The assets folder contains image and other asset files to be copied as-is when you build your application.
Notice you can create any folders you want in assets if you want to order your files.

Related

Flutter web svg image will not be displayed after Firebase hosting

Svg images do not appear after hosting. Consolos scan shows that svg files are downloaded. But it doesn't appear. Can anyone help me with this?
I have already built the web app in both html and canvaskit, but it doesn't work in either. I can only see the svg images on localhost.
I use the https://pub.dev/packages/flutter_svg package.
I use a Firebase hosting service.
enter image description here => localhost
enter image description here => hosting
In my case I needed to put the full path name (i.e. include 'assets/'):
SvgPicture.asset('assets/path/to/file.svg')
I found a solution to diplay the current svg/png correctly after Firebase Deploy.
There's something wrong with flutter after we run flutter build web. The respective assets, should be moved into /web directory (on build folder you can check items before do the deploy). But, they are not moved in.
So, in my case, I've removed all assets (png's or svg's) from the root project /assets and set them into the /web/assets folder (mannually)!
This is the automatic process that flutter do after you run flutter build web.
Just pay attention with the declaration of the assets in the pubspec.yaml file. The files must be matching the path for the web folder.
Example:
pubspec.yaml
assets:
- assets/
using the svg icon (without the /assets):
myIcon.svg
Try it. It should work.

I'm using tailwindCSS for a simple html site but deployment on netlify does not work, why?

I've been learning how to use tailwind css by following the offical video tutorial and I just wanted to try to deploy the site example to Netlify to see if it works using the drag and drop feature.
This means taking the entire project folder and dumping it into netlify. This usually works with vanilla html css js sites but for some reason I get the error
Page Not Found Looks like you've followed a broken link or entered a URL that doesn't exist on this site.
This is how the project structured looked like:
What am I doing wrong? Inside the build folder there is another file called tailwind.css
On your Netlify dashboard, change the publish directory to the directory where your index.html file resides: public/. That should do it.
You can also, as you said, take everything out of the public folder and put it at the same level as the other folder and files, which makes the index.html available at the root of the project. However, then you lose your project's file organization.
I've fixed the problem.
The trick was to take everything out of the public folder and put it at the same level as the other folder and files.
This would make the index.html file available at the root of the project and would allow the site to work properly once deployed.

deleted css files are accessing and web application is running those files

I made a static folder where I saved all css files to be used in my flask web development project. It is not reflecting the changes while I was doing some change .When I deleted that static folder then also it is accesing the files.
I have not clue from where it is accessing..
Please solve this problem
Thanks in advance
gallery.css file is not present:-
but accessing this file:-
try going to your project directory (not in your IDE, but the folder where the project is located)
find any/all directories named
__pycache__
and delete them.
clear all browser cache.
rerun the app in your IDE

How to make Azure App Service Web Apps serve my website out of my repoRoot/src/views/ folder as the website root?

In one of my git repos, I've got a simple HTML website with the following folder structure:
repo root:
--reference
--developer-notes.txt
--i-am-not-website-code.txt
--i-am-not-meant-to-be-served-by-web-server.txt
--etc.txt
--src
--views
--index.html
--etc.html
--content
--foo.css
--etc.css
--images
--foo.png
--etc.png
--scripts
--foo.js
--etc.js
I just created a App Service Web App on Azure, configured it to pull the source out of my repo, and deployed it.
I made sure that the Application Settings -> Default Document list had an entry for the index.html file.
However, as understood, due to my folder structure, I can only view my website if I go to:
foo.azurewebsites.net/src/views/index.html
I cannot go just to:
foo.azurewebsites.net/
and see my index.html page.
Now, I can change my folder structure by putting my HTML pages in the root, to make the website appear at foo.azurewebsites.net/. But I was wondering if there was a way to not have to do that, esp. given that every repo also stores stuff other than the source code, for example in my case the Reference folder, and most repos have the source, which only one of the many artifacts, in the source folder.
Is there?
One thing you can do is to change the virtual path for your root application to point to your views folder in the Virtual applications and directories section of your Application settings. That way you will have foo.azurewebsites.net/ serve your index.html file.
Another thing you will have to do in this case, is to set the virtual application paths for your content and scripts folders (and the reference folder if you need to access it's content from the web) since they are not under your views folder.
Given your folder structure, it would look something like this:

Xamarin ios - Include Files in IPA

I want to include some images within my ipa-File, that need to be placed into the app's documents folder. A similar request was here: Preloading Documents into iOS App. But I'm not familiar with Objective-C. I think I can do it some way in Xamarion.iOS, but the problem in my opinion is the quite large number of files (around 300MB). When I include the files within the AppRessources and copy them on startup, they exist twice on the disk. So there is no real saving...
Any other ideas, how i can include files without being stored twice?
Files that you include in studio goes into your bundle. You can only read them from your application. Modifications and removing is not possible. File that you copy from bundle into your Documents folder, can be modified or removed in Document folder. So there is no way to removing files from a bundle, even if you copy them into Document folder.
You can use on demand resources to download them later intro your app:
https://developer.xamarin.com/guides/ios/tvos/application-fundamentals/resources-data-storage/#On-Demand-Resources

Resources