IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact
You are here: Home / How To / How to Activate Built-in Web Server

How to Activate Built-in Web Server

Laptop icon

If you ever need to use a local web server on Windows, it’s always convenient just to turn on IIS server in your system. But for a security reason, that’s not feasible to have that in your corporate environment. However, IIS is not the only option available, if you have any of development tools installed in your system, you’re still in luck.

This post will show how you can activate a built-in web server if you have any (or a combination of) of the following: PHP, Python and/or Node.js.

With the assumption that we’re using port 8000 for the built-in server, here are the command line to activate the built-in web server from each platform.

IMPORTANT: DO NOT USE FOR PRODUCTION. This should be used only for development.

Always type in the command line from the web folder.

PHP

If you don’t have it installed yet, here’s how to install PHP on Windows.

php -S localhost:8000

Python 2

This is strictly posted for a legacy system. If you don’t have Python 2 yet, it’s better just to install the newer Python 3 for this purpose.

python -m SimpleHTTPServer 8000

Python 3

Make sure Python 3 is installed.

python -m http.server 8000

Node.js npm

Before you can activate the web server, you need to install express first.

npm install express —save (just need to install this one time)

Then you can activate it by typing this command:

node http.js

Further Reading

How to Install IIS on Windows 10
How to Install Python on Windows Server
How to Install PHP on Windows 10

January 10, 2023 Filed Under: How To Tagged With: Web Server

Buy me a coffee?

Buy me a coffee If you find any of the articles or demos helpful, please consider supporting my work here, you'll have my big thanks!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to Delay Shutdown or Restart on a Mac
  • How to Activate Built-in Web Server
  • SSIS Best Practice with Naming Conventions
  • How to Delay Shutdown or Restart on a Windows Server
  • How to Type Emoji Using Keyboard Shortcuts in Windows and macOS

Recent Posts

  • How to Delay Shutdown or Restart on a Mac
  • How to Activate Built-in Web Server
  • SSIS Best Practice with Naming Conventions
  • How to Delay Shutdown or Restart on a Windows Server
  • How to Type Emoji Using Keyboard Shortcuts in Windows and macOS

Tags

.NET ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack JavaScript Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Web Server Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2023 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure