statik allows you to embed a directory of static files into your Go binary to be later served from an http.FileSystem. Is this a crazy idea? No, not necessarily. If you're building a tool that has a Web component, you typically want to serve some images, CSS and JavaScript. You like the comfort of distributing a single binary, so you don't want to mess with deploying them elsewhere. If your static files are not large in size and will be browsed by a few people, statik is the solution you are looking for. statik is a tiny program that reads a directory and generates a source file that contains its contents. The generated source file registers the directory contents to be used by statik file system. In your program, all your need to do is to import the generated package, initialize a new statik file system and serve.

Features

  • By default, statik includes the "last modified" (mtime) time on files that it packs
  • Allows an HTTP FileServer to present the correct file modification times to clients
  • You can also read the content of a single file
  • statik is a tiny program that reads a directory and generates a source file that contains its contents
  • The generated source file registers the directory contents to be used by statik file system
  • The command below will walk on the public path and generate a package called statik under the current working directory

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

Apache License V2.0

Follow statik

statik Web Site

You Might Also Like
SKUDONET Open Source Load Balancer Icon
SKUDONET Open Source Load Balancer

Take advantage of Open Source Load Balancer to elevate your business security and IT infrastructure with a custom ADC Solution.

SKUDONET ADC, operates at the application layer, efficiently distributing network load and application load across multiple servers. This not only enhances the performance of your application but also ensures that your web servers can handle more traffic seamlessly.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of statik!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks

Registered

2023-01-13