@ozanarslan/corpus 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Corpus
|
|
2
2
|
|
|
3
3
|
A very simple typescript backend framework package to use for personal projects or simple crud applications.
|
|
4
4
|
This package is by no means a replacement for full fledged backend frameworks commonly used in production.
|
|
@@ -8,17 +8,17 @@ This package is by no means a replacement for full fledged backend frameworks co
|
|
|
8
8
|
Install the package:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
bun add @
|
|
11
|
+
bun add @ozanarslan/corpus
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @
|
|
15
|
+
npm install @ozanarslan/corpus
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Create a simple server:
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
import { Server, Route, Config } from "@
|
|
21
|
+
import { Server, Route, Config } from "@ozanarslan/corpus";
|
|
22
22
|
|
|
23
23
|
// Initialize server
|
|
24
24
|
const server = new Server();
|
|
@@ -58,7 +58,7 @@ Originally I wanted to support Node and Bun runtimes but to be honest, I didn't
|
|
|
58
58
|
// You can also use something else
|
|
59
59
|
import { type } from "arktype";
|
|
60
60
|
// You can also import everything by name
|
|
61
|
-
import C from "@
|
|
61
|
+
import C from "@ozanarslan/corpus";
|
|
62
62
|
|
|
63
63
|
// You can use schemas however you want, I just really like this.
|
|
64
64
|
export class ItemModel {
|
|
@@ -142,7 +142,7 @@ server.listen(
|
|
|
142
142
|
## What interfaces can be extended
|
|
143
143
|
|
|
144
144
|
```typescript
|
|
145
|
-
declare module "@
|
|
145
|
+
declare module "@ozanarslan/corpus" {
|
|
146
146
|
// process.env basically
|
|
147
147
|
interface Env {}
|
|
148
148
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ozanarslan/corpus",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"module": "index.ts",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.1",
|
|
6
6
|
"description": "Small Typescript backend framework with only core utilities",
|
|
7
7
|
"author": "Ozan Arslan <ozanarslanwork@gmail.com>",
|
|
8
8
|
"license": "MIT",
|