Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

Simple Node.js Static Server 🚀

A basic Node.js server to serve static files such as HTML, CSS, and JavaScript. This project demonstrates how to create a simple web server using Node.js's built-in http and fs modules, without any external dependencies.

Features ✨

  • Serve static HTML, CSS, and JavaScript files
  • Basic error handling for 404 and 500 errors
  • Support for common MIME types

Getting Started 🚀

Prerequisites 🛠️

  • Node.js (v14 or higher recommended)

Installation 🔧

  1. Clone the repository:

    git clone https://github.com/your-username/simple-node-static-server.git
  2. Navigate to the project directory:

    cd simple-node-static-server
  3. Install dependencies (if any):

    This project uses only built-in Node.js modules, so no additional dependencies need to be installed.

Usage 🏃‍♂️

  1. Start the server:

    node index.js
    
  2. Open your browser and go to:

    http://localhost:3000
    

    You should see a simple static page served by the Node.js server.

Project Structure 🗂️

/public
- index.html # Main HTML file
- style.css # CSS styles
- script.js # JavaScript file
/index.js # Node.js server script
package.json # Project metadata

License 📜

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements 🙏

  • This project is intended for educational purposes and demonstrates basic static file serving with Node.js.

About

🚀 A basic Node.js server for serving static files such as HTML, CSS, and JavaScript. Perfect for learning how to create a simple web server without external dependencies.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages