https://github.com/noahwillson/butter-framework
Butter is Nodejs Framework that is provide basic auth and user management functionalities
https://github.com/noahwillson/butter-framework
framework http nodejs proxy
Last synced: 7 months ago
JSON representation
Butter is Nodejs Framework that is provide basic auth and user management functionalities
- Host: GitHub
- URL: https://github.com/noahwillson/butter-framework
- Owner: noahwillson
- Created: 2025-03-30T21:25:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-30T21:28:11.000Z (about 1 year ago)
- Last Synced: 2025-06-03T19:50:36.838Z (10 months ago)
- Topics: framework, http, nodejs, proxy
- Language: JavaScript
- Homepage:
- Size: 733 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# HTTP Server with Authentication and Post Management
This project is a simple HTTP server built using a custom framework called `Butter`. It provides basic authentication, user management, and post management functionalities. The server is designed to handle JSON-based API requests and serve static files for a front-end application.
## Features
- **User Authentication**:
- Login with username and password to receive a session token.
- Logout to invalidate the session token.
- **User Management**:
- Retrieve user information.
- Update user details (username, name, and optionally password).
- **Post Management**:
- Retrieve a list of posts with author information.
- Create new posts.
- **Static File Serving**:
- Serve `index.html`, `styles.css`, and `scripts.js` for the front-end.
- **Middleware**:
- JSON body parsing for API requests.
- Authentication middleware to protect specific routes.
## API Endpoints
### Authentication Routes
- **POST `/api/login`**
Logs in a user and returns a session token.
**Request Body**:
```json
{
"username": "liam23",
"password": "string"
}
```