The reason you want to create

Serving static files in development In order to add style dates and images to the page we had to make changes to the project. Let’s step through it, starting with the development environment and seeing how we can serve different static files in different ways. Setting up a static files directory It is recommended to manage all static resources on a per-application basis, which means that all the files and images required by a specific application should reside within the scope of that application. So let’s update the application and create a directory called and inside it another directory called.

Then create three more directories

And within that directory. We will end up with a structure similar to the one below. a directory within a directory is to help you namespace your static assets. If you have multiple applications Saudi Arabia Number Data and a stylesheet is named in both applications it will only use the first stylesheet it finds because it cannot differentiate between the other stylesheets. So we name them so that we can know which resource file we are referencing in the template. Create static files Learn to use coding In this step we set up minimal static assets to demonstrate how to serve files in development. Create a file under that directory and name it and add the following code.

Phone Number Data

The above code gets today’s date

From and formats it into a string and then displays it in as. Create a file named in that directory and add the following code. The above code uses layout to center all items on the Malaysia Phone Number page horizontally and vertically. It also sets the element’s font size and color to green. For image you can use any image you like. Just copy some images into a directory and make a note of the names. Configuring Static File Settings To serve static files in development a number of things must be set in the file. Open the file and check if the following settings are. Generally recommended in the project settings during development.

Leave a comment

Your email address will not be published. Required fields are marked *