Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:51:52+00:00 2026-06-12T23:51:52+00:00

Python’s http.server (or SimpleHTTPServer for Python 2) is a great way of serve the

  • 0

Python’s http.server (or SimpleHTTPServer for Python 2) is a great way of serve the contents of the current directory from the command line:

python -m http.server

However, as far as web servers go, it’s very slooooow…

It behaves as though it’s single threaded, and occasionally causes timeout errors when loading JavaScript AMD modules using RequireJS. It can take five to ten seconds to load a simple page with no images.

What’s a faster alternative that is just as convenient?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:51:53+00:00Added an answer on June 12, 2026 at 11:51 pm

    http-server for node.js is very convenient, and is a lot faster than Python’s SimpleHTTPServer. This is primarily because it uses asynchronous IO for concurrent handling of requests, instead of serialising requests.

    Installation

    Install node.js if you haven’t already. Then use the node package manager (npm) to install the package, using the -g option to install globally. If you’re on Windows you’ll need a prompt with administrator permissions, and on Linux/OSX you’ll want to sudo the command:

    npm install http-server -g
    

    This will download any required dependencies and install http-server.

    Use

    Now, from any directory, you can type:

    http-server [path] [options]
    

    Path is optional, defaulting to ./public if it exists, otherwise ./.

    Options are [defaults]:

    • -p The port number to listen on [8080]
    • -a The host address to bind to [localhost]
    • -i Display directory index pages [True]
    • -s or --silent Silent mode won’t log to the console
    • -h or --help Displays help message and exits

    So to serve the current directory on port 8000, type:

    http-server -p 8000
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Python, through it's readline bindings allows for great command-line autocompletion (as described in here
Python does not print traceback messages from exceptions raised in daemon threads. For example,
Python allows to call a static method not only from a class, but also
Python's arbitrary precision decimals are lovely, but I can't seem to find a way
Python provides csv.DictWriter for outputting CSV to a file. What is the simplest way
Python loves raising exceptions, which is usually great. But I'm facing some strings I
Python's paster serve app.ini is taking longer than I would like to be ready
Python is installed in a directory all users have full access to, but when
Python newbie here and wanted to know if there was a way to combine
Python beginner >>> import oauth2 Traceback (most recent call last): File , line 1,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.