This project is a simple Node.js and Express API server with a web frontend. It demonstrates CRUD operations for a "Page" resource, complete with Swagger documentation and a static website for interacting with the API.
- RESTful CRUD API for pages (
/pages
) - Swagger UI documentation (
/api-docs
) - Static frontend to view and manage pages
- Example endpoints for contacts
npm install
npm start
Or, if not configured:
node server.js
- API docs: http://localhost:3000/api-docs
- Web frontend: http://localhost:3000/
GET /pages
— List all pagesPOST /pages
— Create a new page (JSON body:{ "title": "...", "content": "..." }
)GET /pages/:id
— Get a page by IDPUT /pages/:id
— Update a page by IDDELETE /pages/:id
— Delete a page by IDGET /contact
— Contact page endpoint
- View all pages
- Add, update, or delete pages using the buttons
- Click a page to view its details
- Edit routes in
routes/page.js
androutes/contact.js
- Static files are in the
public/
folder - API documentation is in
swagger.yaml
© 2025 evelink