A Node.js Express backend for a travel application.
- Express server with CORS support
- Environment variable configuration
- Error handling middleware
- Development mode with hot reloading
- Node.js (v14 or higher)
- npm (v6 or higher)
- Clone the repository:
git clone <repository-url>
cd backend
- Install dependencies:
npm install
- Create a
.env
file in the root directory:
PORT=3000
NODE_ENV=development
Development mode:
npm run dev
Production mode:
npm start
The server will start on port 3000 by default (or the port specified in your .env file).
GET /api
: Welcome message
backend/
├── src/
│ └── app.js # Main application file
├── .env # Environment variables
├── .gitignore # Git ignore file
├── package.json # Project dependencies and scripts
└── README.md # Project documentation
ISC