- 🚀 Express.js: A fast, minimal, and powerful web application framework for Node.js.
- 📜 Morgan: Elegant HTTP request logger middleware for streamlined debugging.
- 🍪 Cookie-parser: Effortlessly parses cookies from client requests for easy access.
- 🛠️ Debug: A powerful utility for debugging and tracking your application with ease.
⚠️ HTTP-errors: Simplifies creating and managing HTTP error responses.- ✨ Pug: A modern templating engine for building dynamic and beautiful HTML views.
Before you dive in, make sure you’ve got these essentials ready to roll:
- 🚀 Node.js (LTS version recommended) – The backbone of this application.
- 🐳 Docker – For containerizing and streamlining your setup.
- 📦 Docker Compose – Orchestrate multiple containers with ease.
-
Clone the Repository:
git clone https://github.com/RomanR-dev/express_js_learning_1.git cd express_js_learning_1
-
Install Dependencies:
npm install
-
Start the Application Locally:
cd frontend npm start
🌟 Your app will be live at: http://localhost:3000 🎉
You can use Docker Compose to run the application in a containerized environment.
-
Build and start the application using
docker-compose
:docker compose build docker compose up
-
Once the containers are running, the application will be available at:
http://localhost:3000
🌟 The app is live and ready for action! 🎉
-
To stop the application, gracefully shut it down by running:
docker-compose down
Below is an example of a docker-compose.yml
configuration file you can use for this project:
version: '3.8'
services:
app:
build:
context: .
image: express-app:latest
ports:
- "3000:3000"
app.js
: Main application file where middleware and routes are defined.routes/
: Contains route files for handling specific endpoints.views/
: Contains Pug templates for rendering HTML views.public/
: Static files such as CSS, JavaScript, and images.bin/
: Contains executable files likewww
to start the server.
🌐 Preview of the Website in Action:
✨ Experience the sleek design and functionality of the Node.js Express Starter Project! 🚀