Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation of ecstatic #568

Closed
gswebspace opened this issue Oct 22, 2019 · 7 comments · Fixed by #693
Closed

Deprecation of ecstatic #568

gswebspace opened this issue Oct 22, 2019 · 7 comments · Fixed by #693
Labels
major version Major, potentially breaking, change
Milestone

Comments

@gswebspace
Copy link

This is probably not a bug or a feature request.
More of a concern. Just wanted to share with the team in case not known already.

The ecstatic package has been deprecated and here is the feedback from the author.

This may require exploration of an alternative static file server. Any feedback is welcome, Thanks!

@greggman
Copy link

greggman commented Nov 1, 2019

I have no real clue about severs but writing my own I used express-static and serve-index in my own simple server.

const express = require('express');
const cors = require('cors');
const serveIndex = require('serve-index');
const expressApp = express();
expressApp.use(cors());
const staticOptions = {
  fallthrough: true,
  index: 'index.html',
};
expressApp.use(express.static(root, staticOptions));
expressApp.use(serveIndex(root, {icons: true,}));
const server = expressApp.listen(8080);

I haven't looked into how to add https certs and the other options that http-server supports

My biggest concern is 100s of popular webpages suggest to new developers they use http-server. I can't fix all those 100s of links to recommend something else so I'd prefer to try to help http-server get fixed. In particular the Windows issue (estatic stopped working correctly with windows where as serve-index above seems to work for me)

I'd love to hear from the maintainer here, how can we (I) help? I see 56 outstanding pull requests so before I go try to submit a PR can you give us some direction about what PRs you'll accept?

@greggman
Copy link

greggman commented Nov 4, 2019

Okay well I spent about 6 hours trying to get http-server fixed for some defintion of fixed. I switched to express static and other things and it worked but ...

  • there would be more work if anyone is using it as a library, not just as a command

    mostly that comes down to the express using next instead of emitting an event

  • http-server is currently requiring to run on node 4,5,6,7

    that may or may not be an issue but there is stuff like the deep usage of deprecated util.print and vows being out of date etc..

Finally I just decided that negociating with the developer here to fix this wasn't worth my time so I wrote my own replacement which is here

https://github.com/greggman/servez-cli

I put similar features in. If you just need a command line server, not a library, then consider giving it a try. I've only used it in node 12.

Super thanks to the devs here. I've used http-server for many years and it's been great! I've had a small taste of maintaining open source projecs and I know it can be a thankless job so thanks so much for all your years of support! ❤️

@Qws
Copy link

Qws commented Nov 14, 2019

Kinda curious what's the future of this project if Ecstatic is deprecated. Because this is a very popular repository, even more popular than Ecstatic itself.

@greggman 's server looks interesting too, maybe http-server can becomes a wrapper around it same way Ecstatic currently is?

But honestly, I think Node.js needs a standard build-in static-server, just like .NET core and Python 3 has one...

@mkj28
Copy link

mkj28 commented Jan 1, 2020

ecstatic now has a Denial of Service issue identified: https://app.snyk.io/vuln/SNYK-JS-ECSTATIC-540354

@jisoolee
Copy link

Is there any future plan to replace ecstatic?

@thornjad
Copy link
Member

thornjad commented Feb 5, 2020

Right now I'm planning on having the 0.13.0 release of http-server contain its own version of ecstatic to get rid of any deprecation concerns (. Beyond that, we're working on rewriting entirely, which will allow us to get rid of the need for ecstatic and a couple other libraries, and provide a better API.

@thornjad thornjad added this to the v0.13.0 milestone Feb 5, 2020
@thornjad thornjad mentioned this issue Jul 6, 2021
2 tasks
@thornjad thornjad added ecstatic major version Major, potentially breaking, change labels Jul 6, 2021
@tchakabam

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major version Major, potentially breaking, change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants