Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jackall3n/minirest

A tiny REST CLI 👝
https://github.com/jackall3n/minirest

Last synced: 4 days ago
JSON representation

A tiny REST CLI 👝

Awesome Lists containing this project

README

        

# minirest 👝

### What is it?

A package used to create a tiny REST api using directory routing.

### Examples

#### Default export
```typescript
// src/index.js

export default "Hello World"
```

#### Default export function
```typescript
// src/index.js

export default () => {
return "Hello World";
}
```

#### Method
```typescript
// src/index.js

export function get() {
return "Hello GET";
}

```

#### Params
```typescript
// src/users/[id].js

export function get({ query }) {
return `Hello, user ${query.id}`;
}

```