# xcess

> simple and minimalistic web framework

Latest version **1.0.0** (published 2023-06-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install xcess
pnpm add xcess
yarn add xcess
bun add xcess
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-06-10 |
| First published | 2023-06-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | HritikR |
| Maintainers | hritikr |
| Keywords | xcess, xpress, express, express-like, server, webframework |

## Links

- npm: https://www.npmjs.com/package/xcess
- Repository: https://github.com/HritikR/Xcess
- Homepage: https://github.com/HritikR/Xcess#readme
- Issues: https://github.com/HritikR/Xcess/issues
- npm.io page: https://npm.io/package/xcess

## Dependencies (1)

- [mime](https://npm.io/package/mime.md) ^3.0.0

## Recent versions

- 1.0.0 (latest) — 2023-06-10

## README

# Xcess - Simple and Minimalistic Web Framework 

Xcess is a lightweight, express-like and easy-to-use web framework for Node.js, inspired by Express.js. It provides a simple API for creating web applications and handling HTTP requests and responses. With Xpress, you can define routes, use middleware functions, handle static file serving, and enable Cross-Origin Resource Sharing (CORS).

## Features

- Easy routing using HTTP methods (GET, POST, PUT, DELETE)
- Middleware support for request processing
- Cross-Origin Resource Sharing (CORS) handling
- Static file serving

## Installation

To install Xcess, you can use npm:

```bash
npm install xcess
```

## Usage

Here's an example of how you can use Xcess:

```javascript
const xcess = require('xcess');

const app = new xcess();

app.get('/', (req, res) => {
    res.send('Hello World!');
})
```
---
## Route Methods

Xcess provides several route methods that allow you to define handlers for different HTTP methods. Here are the available route methods:

### `app.get(path, handler)`

The `get()` method is used to define a route handler for GET requests.

**Usage Example:**

```javascript
app.get('/', (req, res) => {
    // Handler logic for GET '/'
});
```

### `app.post(path, handler)`

The `post()` method is used to define a route handler for POST requests.

**Usage Example:**

```javascript
app.post('/users', (req, res) => {
    // Handler logic for POST '/'
});
```

### `app.put(path, handler)`

The `put()` method is used to define a route handler for PUT requests.

**Usage Example:**

```javascript
app.put('/users/:id', (req, res) => {
    // Handler logic for PUT '/users/:id'
});
```

### `app.delete(path, handler)`

The `delete()` method is used to define a route handler for DELETE requests.

**Usage Example:**

```javascript
app.delete('/users/:id', (req, res) => {
    // Handler logic for DELETE '/users/:id'
});
```

### `app.all(path, handler)`

The `all()` method is used to define a route handler for all HTTP methods.

**Usage Example:**

```javascript
app.all('/users', (req, res) => {
    // Handler logic for all methods '/users'
});
```

---
_Source: https://npm.io/package/xcess · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
