In this project, I built a basic static file server using Node.js. The server listens on port 3000 and serves HTML, CSS, JS, and PNG files from the project directory. It uses Node's built-in http, fs, and path modules to handle requests and serve files with the correct MIME types. If a requested file is not found, the server responds with a custom 404 message.
This project is a great starting point for anyone looking to understand how to serve static files with Node.js without any external frameworks. The main purpose of this project is to teach and to demonstrate the capabilities of nodeJS.
Check out the code on GitHub:
https://github.com/aayush130405/Node-static-server.git
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.