Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Echo Quick Start Guide

You're reading from  Echo Quick Start Guide

Product type Book
Published in May 2018
Publisher Packt
ISBN-13 9781789139433
Pages 136 pages
Edition 1st Edition
Languages
Author (1):
Ben Huson Ben Huson
Profile icon Ben Huson

Serving static files

When we talk about static files, we are talking about web application assets that are needed in order to render a working user experience. Static file assets include, but are not limited to, Cascading Style Sheet (CSS) files, JavaScript (JS) files, and any other file that a user would need to download in order to render the web application within the browser. Within Echo, we are able to present an interface for the browser to download these assets much in the same way we present new routes within Echo. The following is an example from our project where we are going to present a route called /static/ wherein every request that is made to any resource prefixed with /static/ will be served from a particular directory which is based on the location of the binary executable, in our example the ./static/ directory:

e.Static("/static", "static"...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}