A simple static web server built with Node.js and Express. This server serves static files such as HTML, CSS, and JavaScript, making it easy to host and test your web projects locally.
- Serve static files from a designated directory
- Easy to set up and run
- Supports auto-refresh with Live Server extension in Visual Studio Code
- Node.js installed on your machine.
- Clone the repository:
git clone https://github.com/DeniedPath/Static-web-server.git cd Static-web-server
- Install dependencies:
npm install
To start the server, run the following command:
node server.js
Your static site will be available at http://localhost:3000.
If you prefer using the Live Server extension in Visual Studio Code:
- Install the Live Server extension from the Extensions Marketplace.
- Open your project folder in Visual Studio Code.
- Right-click on
index.html(or your main HTML file) and select "Open with Live Server".
my-static-web-server/ ├── public/ │ ├── index.html │ ├── styles.css │ └── script.js ├── server.js └── package.json
Contributions are welcome! Please feel free to submit a pull request or open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.