This is a simple web server setup using Node.js and Express, designed with features to optimize performance, security, and usability. It includes compression, security headers, and basic logging.
- Compression: Reduces the size of responses to improve load times.
- Security: Implements security headers using Helmet.
- Logging: Logs HTTP requests using Morgan.
- Basic API: Example route for serving JSON data.
- Node.js and npm installed.
-
Clone the Repository
git clone https://github.com/allyelvis/africa-webserver-bdi.git cd africa-webserver-bdi
-
Install Dependencies
npm install
-
Start the Server
node server.js
-
Access the Application
Open your web browser and navigate to
http://localhost:3000
to view the welcome message. Access the API athttp://localhost:3000/api/data
.
server.js
: Main server file with route handlers and middleware.package.json
: Lists project dependencies and scripts.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or suggestions, please contact:
- Name: Ally Elvis Nzeyimana
- Email: allyelvis6569@gmail.com