Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 👝
- Host: GitHub
- URL: https://github.com/jackall3n/minirest
- Owner: jackall3n
- Created: 2022-11-14T12:48:24.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:45:59.000Z (about 1 year ago)
- Last Synced: 2024-11-09T08:42:32.628Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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.jsexport default "Hello World"
```#### Default export function
```typescript
// src/index.jsexport default () => {
return "Hello World";
}
```#### Method
```typescript
// src/index.jsexport function get() {
return "Hello GET";
}```
#### Params
```typescript
// src/users/[id].jsexport function get({ query }) {
return `Hello, user ${query.id}`;
}```