Git Product home page Git Product logo

Comments (23)

anderspitman avatar anderspitman commented on May 5, 2024 29

Just want to chime in that lack of WebAssembly mime is forcing me to look for an alternative local server. http-server has beautifully handled all my needs up to this point and I'd hate to switch if I don't have to.

from http-server.

anderspitman avatar anderspitman commented on May 5, 2024 11

@paulmelnikow I've been using https://crates.io/crates/https. That page includes installation instructions for non Rust developers as well.

from http-server.

75lb avatar 75lb commented on May 5, 2024 4

MIME types can be customised in local-web-server, is that the kind of behaviour you're looking for?

from http-server.

ddennedy avatar ddennedy commented on May 5, 2024 3

In case you landed here to figure out how to use the --mimetypes command line option and the syntax of its file, see here: https://github.com/jfhbrook/node-ecstatic#--mime-types-filename
(However, note that the option is not --mime-types in http-server!)
For example,

$ cat hls/mime.types
ecstatic({ mimeTypes: { 'application/vnd.apple.mpegurl': ['m3u8'] } })

from http-server.

codydjango avatar codydjango commented on May 5, 2024 1

Yes, I'd like to be able to configure additional content types as well.

For instance, text/cache-manifest for .manifest files. Seems to work fine in chrome either way, but I imagine there are other use cases for this feature.

from http-server.

stowball avatar stowball commented on May 5, 2024 1

I would love to be able to serve SVGs correctly using the MIME type images/svg+xml

from http-server.

mtozlu avatar mtozlu commented on May 5, 2024 1

Example mime type file can be found here;
https://github.com/http-party/http-server/blob/93fbb755fe55aa13878af9a91bc8e1a274522dbe/test/fixtures/custom_mime_type.types

from http-server.

dsoudakov avatar dsoudakov commented on May 5, 2024 1

In case you landed here to figure out how to use the --mimetypes command line option and the syntax of its file, see here: https://github.com/jfhbrook/node-ecstatic#--mime-types-filename (However, note that the option is not --mime-types in http-server!) For example,

$ cat hls/mime.types
ecstatic({ mimeTypes: { 'application/vnd.apple.mpegurl': ['m3u8'] } })

Simply creating a custom.types file with "type ext1 ext2" works.

from http-server.

mmalecki avatar mmalecki commented on May 5, 2024

+1, would love it for .webapp. Pull requests would be welcome!

from http-server.

danielmahon avatar danielmahon commented on May 5, 2024

+1

from http-server.

ckapop avatar ckapop commented on May 5, 2024

Any news on HTML 5 video support?

from http-server.

mrthan avatar mrthan commented on May 5, 2024

+1 I'm trying to test m3u8 HLS playlists and need to set the mime type

from http-server.

Baccanno avatar Baccanno commented on May 5, 2024

+1 Resource interpreted as Stylesheet but transferred with MIME type application/octet-stream: "http://localhost:8080/less/main.less".

from http-server.

ralyodio avatar ralyodio commented on May 5, 2024

also .less is not supported +1 for that.

from http-server.

dotnetCarpenter avatar dotnetCarpenter commented on May 5, 2024

I'll give it a shot. Just got an API implemented in the upstream ecstatic. If it gets accepted and I'm successful here... well, then it's done.

from http-server.

dotnetCarpenter avatar dotnetCarpenter commented on May 5, 2024

Can someone give me a hand with #152?
I can't figure out how to test the feature with vows. If I start http-server, I can request files with custom mime-types but no matter what I do in http-server-test.js, I get an ECONNREFUSED. I'm pretty sure it's a race condition but I can't figure out how to fix it.

Any ideas?

from http-server.

timdp avatar timdp commented on May 5, 2024

It'd also be nice if we could map .mpd to application/dash+xml for MPEG-DASH.

from http-server.

BigBlueHat avatar BigBlueHat commented on May 5, 2024

#152 just needs tests afaict. If anyone wants to right those, I'd be 👍 for merging that. Setting media types correctly is rather essential--and ecstatic already supports a way to set the mappings (between extension and media type) properly. So. Who's up for writing tests?! 😁

from http-server.

grokify avatar grokify commented on May 5, 2024

+1 for SVG and/or customizable approach similar local-web-server.

from http-server.

disfeng avatar disfeng commented on May 5, 2024

+1

from http-server.

paulmelnikow avatar paulmelnikow commented on May 5, 2024

@anderspitman Did you find another option? At some point I switched from http-server to serve, but it has the same limitation.

from http-server.

yiminghe avatar yiminghe commented on May 5, 2024

https://crates.io/crates/https: http -m wasm:application/wasm

from http-server.

acxz avatar acxz commented on May 5, 2024

@ddennedy I'm afraid that didn't seem to change anything for me

from http-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.