GitHunt
MD

mdahamshi/express-basic

A simple Node.js and Express.js server setup for learning or bootstrapping a backend project.

๐Ÿ“„ README.md

# Basic Node/Express Server

A simple Node.js and Express.js server setup for learning or bootstrapping a backend project.

## ๐Ÿš€ Features

- Fast and lightweight Express server
- `.env` support via `dotenv`
- JSON body parsing middleware
- Basic routing (GET, POST)
- 404 handler for unknown routes

## ๐Ÿ› ๏ธ Tech Stack

- Node.js
- Express.js
- dotenv
- ejs

## ๐Ÿ“‚ Folder Structure

my-app/
โ”œโ”€โ”€ server.js # Main server entry point
โ”œโ”€โ”€ package.json # Project config and dependencies
โ””โ”€โ”€ .env # Environment variables


## ๐Ÿงช Installation

1. Clone the repo:
   ```bash
   git clone https://github.com/your-username/basic-node-express.git
   cd basic-node-express
  1. Install dependencies:

    npm install
  2. Create a .env file:

    PORT=3000
  3. Start the server:

    npm run dev    # for development with nodemon
    # or
    npm start      # for production
  4. Open your browser:

    http://localhost:3000
    

๐Ÿ“ฌ Example Routes

  • GET / โ†’ Welcome message
  • GET /about โ†’ About page
  • POST /api/data โ†’ Send { "name": "YourName" } and receive a greeting

๐Ÿ“„ License

This project is licensed under the ISC License.

โœ๏ธ Author

Mohammad Dahamshi
GitHub Profile

Languages

JavaScript66.4%EJS29.0%CSS4.6%

Contributors

MIT License
Created July 29, 2025
Updated July 30, 2025
mdahamshi/express-basic | GitHunt