fileviewer

command
v0.0.0-...-3e5f3b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

File viewer

This is a simple web server which renders text files (including HTML, JS, CSS) and Markdown files (dynamically rendered to HTML). Some use cases include quickly browsing local directories via a web browser, including Markdown files with relative links.

This is an early prototype, but you're welcome to play around with it and provide feedback, potential new use cases, etc.

Building

Build in the current directory:

$ go build .

Or you can build it from the top of the tree in a local checkout:

$ go build ./web/filevewer

Or you can build via Bazel:

$ bazel build //web/fileviewer

Or you can build it without having this repo locally:

$ go install github.com/mbrukman/notebook/web/fileviewer@latest

Running

Run locally with a custom web root (only accessible from localhost by default):

$ ./fileviewer -web-root ~/notebook

Expose it to everyone who can access this computer via the network:

$ ./fileviewer -web-root ~/notebook -host 0.0.0.0

Get a list of available flags:

$ ./fileviewer -help

Running via Bazel (this path is printed when you run the bazel build ... command above):

$ bazel-bin/web/fileviewer/fileviewer_/fileviewer [...flags]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL