Cookie Consent by Free Privacy Policy Generator Aktuallisiere deine Cookie Einstellungen ๐Ÿ“Œ How to Setup a Simple HTTP Server/ Local Web Server with NodeJS


๐Ÿ“š How to Setup a Simple HTTP Server/ Local Web Server with NodeJS


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

In this article, I am going to explain to you how to set up a simple HTTP web server on local machine using NodeJS. http-server npm package is used to run the web server, Its a single step task for serving static files on browser.

Install http-server npm package
Install the http-server globally on machine using the node package manager (npm) command-line tool, this will allow you to run a web server from anywhere on your computer.

Run the below command on comman line


npm install -g http-server

Start web server
Move to project folder where static files are kept with below command


cd /Desktop/projects/demo/sample-bootstrap

start web server with below command


http-server

Above command will return Urls of hosted files which can be used to check the hosted files on browser.

Image description

Check the hosted files
After running the last command the static files are hosted on the above 2 links provided, Type http://localhost:8080 on your browser URL and you will see your local website.

Conclusion
http-server is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.

Click here to find Sample Applications on different frameworks of Javascript.

Let me know your thoughts over email [email protected]. I would love to hear them and If you like this article, share with your friends.

This article is originally posted over jsonworld

...



๐Ÿ“Œ How to Setup a Simple HTTP Server/ Local Web Server with NodeJS


๐Ÿ“ˆ 45.88 Punkte

๐Ÿ“Œ Aligning NodeJS with the Web: Should NodeJS Implement The Same APIs as the Web Browser?


๐Ÿ“ˆ 33.91 Punkte

๐Ÿ“Œ CVE-2023-46919 | Phlox Simple HTTP Server/Simple HTTP Server PLUS 1.8 hard-coded key


๐Ÿ“ˆ 23.82 Punkte

๐Ÿ“Œ Why is it so tedious and Painful to setup a Windows server, and so quick and easy to setup a Linux server?


๐Ÿ“ˆ 22.72 Punkte

๐Ÿ“Œ How to Dockerise a NodeJS - TypeScript API || A Comprehensive Guide from Environment Setup to Deployment with a CI/CD Pipeline


๐Ÿ“ˆ 22.65 Punkte

๐Ÿ“Œ How to setup Mac for development in 2024. (Ruby on Rails and NodeJS)


๐Ÿ“ˆ 22.65 Punkte

๐Ÿ“Œ NVIDIA GeForce Experience prior 3.20.5.70 Web Helper NodeJS Web Server uncontrolled search path


๐Ÿ“ˆ 22.62 Punkte

๐Ÿ“Œ Create A Simple Crypto Currency Tracker With NodeJS


๐Ÿ“ˆ 20.78 Punkte

๐Ÿ“Œ JavaScript Web Server using Nodejs


๐Ÿ“ˆ 19.05 Punkte

๐Ÿ“Œ Hosting a NodeJS Web App on Ubuntu Server 22.04


๐Ÿ“ˆ 19.05 Punkte

๐Ÿ“Œ Please recommend distro and/or technique for simple setup of Linux VM as VNC server


๐Ÿ“ˆ 18.76 Punkte

๐Ÿ“Œ [local] Simple Startup Manager 1.17 - 'File' Local Buffer Overflow (PoC)


๐Ÿ“ˆ 18.71 Punkte

๐Ÿ“Œ Cgiscript.net csSearch 2.3 Save Setup csSearch.cgi setup privilege escalation


๐Ÿ“ˆ 18.53 Punkte

๐Ÿ“Œ Gazie 7.32 /setup/install/setup.php hidden_req files or directories accessible


๐Ÿ“ˆ 18.53 Punkte

๐Ÿ“Œ Polr up to 2.2.x Setup /setup/finish comparison


๐Ÿ“ˆ 18.53 Punkte

๐Ÿ“Œ Raspberry Pi Headless Setup: Hereโ€™s How To Setup Raspberry Pi Without A Monitor


๐Ÿ“ˆ 18.53 Punkte

๐Ÿ“Œ How To Get Back to iPhone Setup Screen | iOS Setup Assistant


๐Ÿ“ˆ 18.53 Punkte

๐Ÿ“Œ CVE-2023-38328 | eGroupWare 17.1.20190111 Setup Panel setup/manageheader.php missing encryption


๐Ÿ“ˆ 18.53 Punkte

๐Ÿ“Œ Creator of Ruby on Rails shows off his new Ubuntu setup, and lets you copy his setup with one command.


๐Ÿ“ˆ 18.53 Punkte

๐Ÿ“Œ Setup a local dev server for your Playwright tests


๐Ÿ“ˆ 17.02 Punkte

๐Ÿ“Œ CVE-2023-36704 | Microsoft Windows 10 1809/Server 2019 Setup Files Cleanup Local Privilege Escalation


๐Ÿ“ˆ 17.02 Punkte

๐Ÿ“Œ [local] Easy File Sharing Web Server 7.2 - Account Import Local Buffer Overflow (SEH)


๐Ÿ“ˆ 16.98 Punkte

๐Ÿ“Œ [local] Easy File Sharing Web Server 7.2 - 'New User' Local SEH Overflow


๐Ÿ“ˆ 16.98 Punkte

๐Ÿ“Œ [local] - mail.local(8) (NetBSD) - Local Root Exploit (NetBSD-SA2016-006)


๐Ÿ“ˆ 16.97 Punkte

๐Ÿ“Œ [local] - mail.local(8) (NetBSD) - Local Root Exploit (NetBSD-SA2016-006)


๐Ÿ“ˆ 16.97 Punkte

๐Ÿ“Œ [local] Microsoft Windows - Advanced Local Procedure Call (ALPC) Local Privilege Escalation


๐Ÿ“ˆ 16.97 Punkte

๐Ÿ“Œ Web Scraping With NodeJS and Puppeteer


๐Ÿ“ˆ 16.95 Punkte

๐Ÿ“Œ A Fast Introduction to Fastify (NodeJS Web Framework)


๐Ÿ“ˆ 16.95 Punkte

๐Ÿ“Œ Web scraping Yelp Reviews with Nodejs


๐Ÿ“ˆ 16.95 Punkte

๐Ÿ“Œ Web scraping Google Lens Results with Nodejs


๐Ÿ“ˆ 16.95 Punkte

๐Ÿ“Œ Web scraping The Home Depot Search with Nodejs


๐Ÿ“ˆ 16.95 Punkte

๐Ÿ“Œ Top 8 Features for NodeJS Web Development


๐Ÿ“ˆ 16.95 Punkte

๐Ÿ“Œ How to Setup PVR IPTV Simple Client on Kodi


๐Ÿ“ˆ 16.66 Punkte

๐Ÿ“Œ Simple Linux Virtual Machine Setup in Windows 10 (for beginners)


๐Ÿ“ˆ 16.66 Punkte











matomo