A standard HTTP server with Node.js
git clone [email protected]:Maikxx/HTTP_Server.git
cd HTTP_SERVER
npm start
If you have done this, you can surf to localhost:8000 and enjoy.
- 200 OK and contents if valid HTML files are asked ('index.html' & 'about.html').
- Image handling.
- Handle 404 routes.
- Handle nested request to '/assets' and convert them to '/assets/index.html'.
- Handle request to '/images', when there is no index.html serve the files.
- You can test point 1 by going to routes are accessed correctly, which contain for example an index.html file, like localhost:8000/.
- You can test point 2 by going to, for example, localhost:8000/images/cat.jpg.
- You can test point 3 by going to a non existing route, like localhost:8000/foobar.html.
- You can test points 4 and 5 by adding and deleting index.html files from their corresponding folders (/assets and /images) inside of the public folder.
This project is licensed as MIT by Maikel van Veen.