question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

desktop: Add parameter for serving static files

See original GitHub issue

This is in regard to maputnik/desktop.

I like to propose a parameter --static for maputnik/desktop](https://github.com/maputnik/desktop) that takes a directory (e.g. --static ./foo/bar) and serves the contents of that directory with http.FileServer(http.Dir(...)) under /static.

The intended purpose for --static is to be able to serve assets for the style that is designed, such as sprites and glyphs with the http.Server that maputnik needs to spawn anyway. For example, it would be possible to edit the sprites JSON file and/or the sprites PNG on the local disk and simply reload (F5) Maputnik in the browser to refresh the icons used in the style. (For the initial implementation I’d not include file watches for static assets, maybe these could be added later, too.)

If this is of intereset to the maintainers I’d be happy to contribute a PR to maputnik/desktop.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pathmappercommented, Jul 25, 2020

@zstadler no worries, I tried it and didn’t find any issues. If you’ll see anything not working as expected, please open an issue to report.

Updated the binaries here and moved the idea regarding params for sprite/glyphs to https://github.com/maputnik/editor/issues/715.

0reactions
zstadlercommented, Jul 25, 2020

@pathmapper Thanks for implementing this feature! Sorry I was unable to test it before the merge.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serving Static Files from Netweaver - SAP Blogs
Using transaction RZ10, I updated the instance parameters, adding the ... I'm serving it is as a static file from my Netweaver system, ......
Read more >
Storing and serving static files - App Engine - Google Cloud
To serve static files in the standard environment, you define the handlers in your app.yaml file using either the static_dir or static_files elements....
Read more >
ASP.NET serving both desktop and mobile static files
I have two sets of static files to serve for a website - one for a desktop website, and one for mobile. I'm...
Read more >
hapi — How to Serve Static Files (Images, JS, CSS, etc.)
This guide walks you through the setup of hapi to serve static files like images, JavaScript files, compressed archives ( .zip , .tar...
Read more >
Serving static files in Express
To serve static files such as images, CSS files, and JavaScript files, use the express.static built-in middleware function in Express.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found