This is a simple starter project to help students learn Node.js and Express. It includes a basic Express server, example routes, and comments to explain key concepts.
- Simple Express server
- Example API routes
- Clear folder structure
- Comments for learning
- Node.js installed
- Clone this repository or download the source code.
- Open a terminal in the project directory.
- Run:
npm install
Start the server with:
npm startThe server will run on http://localhost:3000.
index.js- Main entry point, sets up the Express serverroutes/- Folder for route filesroutes/example.js- Example route file
GET /api/hello- Returns a welcome message
- Add more routes in the
routes/folder - Explore Express middleware
- Connect to a database (optional)
Happy coding!