Skip to content

Commit 2f82def

Browse files
committed
fix: rename to frourio-express
1 parent 95d281b commit 2f82def

File tree

5 files changed

+47
-47
lines changed

5 files changed

+47
-47
lines changed

README.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,57 @@
1+
# frourio-express
2+
<br />
13
<br />
24
<div align="center">
3-
<img src="https://frouriojs.github.io/frourio/assets/images/ogp.png" width="1280" alt="frourio" />
5+
<img src="https://frouriojs.github.io/frourio/assets/images/ogp.png" width="1280" alt="frourio-express" />
46
</div>
57

68
<div align="center">
7-
<a href="https://www.npmjs.com/package/frourio">
8-
<img src="https://img.shields.io/npm/v/frourio" alt="npm version" />
9+
<a href="https://www.npmjs.com/package/frourio-express">
10+
<img src="https://img.shields.io/npm/v/frourio-express" alt="npm version" />
911
</a>
10-
<a href="https://github.com/frouriojs/frourio/actions?query=workflow%3A%22Node.js+CI%22">
11-
<img src="https://github.com/frouriojs/frourio/workflows/Node.js%20CI/badge.svg?branch=master" alt="Node.js CI" />
12+
<a href="https://www.npmjs.com/package/frourio-express">
13+
<img src="https://img.shields.io/npm/dm/frourio-express" alt="npm download" />
1214
</a>
13-
<a href="https://codecov.io/gh/frouriojs/frourio">
14-
<img src="https://img.shields.io/codecov/c/github/frouriojs/frourio.svg" alt="Codecov" />
15+
<a href="https://github.com/frouriojs/frourio-express/actions?query=workflow%3A%22Node.js+CI%22">
16+
<img src="https://github.com/frouriojs/frourio-express/workflows/Node.js%20CI/badge.svg?branch=master" alt="Node.js CI" />
1517
</a>
16-
<a href="https://lgtm.com/projects/g/frouriojs/frourio/context:javascript">
17-
<img src="https://img.shields.io/lgtm/grade/javascript/g/frouriojs/frourio.svg" alt="Language grade: JavaScript" />
18+
<a href="https://codecov.io/gh/frouriojs/frourio-express">
19+
<img src="https://img.shields.io/codecov/c/github/frouriojs/frourio-express.svg" alt="Codecov" />
1820
</a>
19-
<a href="https://github.com/frouriojs/frourio/blob/master/packages/frourio/LICENSE">
20-
<img src="https://img.shields.io/npm/l/frourio" alt="License" />
21+
<a href="https://lgtm.com/projects/g/frouriojs/frourio-express/context:javascript">
22+
<img src="https://img.shields.io/lgtm/grade/javascript/g/frouriojs/frourio-express.svg" alt="Language grade: JavaScript" />
2123
</a>
2224
</div>
2325

24-
<p align="center">Frourio is a perfectly type-checkable REST framework for TypeScript.</p>
26+
<p align="center">Frourio-express is a perfectly type-checkable REST framework for TypeScript.</p>
2527
<br />
2628
<br />
2729
<br />
2830

29-
## Why frourio ?
31+
## Why frourio-express ?
3032

3133
Even if you write both the front and server in TypeScript, you can't statically type-check the API's sparsity.
3234

3335
We are always forced to write "Two TypeScript".
3436
We waste a lot of time on dynamic testing using the browser and Docker.
3537

36-
Frourio is a framework for developing web apps quickly and safely in "One TypeScript".
37-
3838
<div align="center">
39-
<img src="https://frouriojs.github.io/frourio/assets/images/problem.png" width="900" alt="Why frourio ?" />
39+
<img src="https://frouriojs.github.io/frourio/assets/images/problem.png" width="1200" alt="Why frourio ?" />
4040
</div>
41+
<br />
4142

42-
43-
## Architecture
44-
45-
In order to develop in "One TypeScript", `frourio` and `aspida` need to cooperate with each other.
46-
You can use `create-frourio-app` to make sure you don't fail in building your environment.
47-
48-
You can choose between Next.js or Nuxt.js for the front framework.
49-
Frourio is based on Express.js, so it's not difficult.
50-
51-
ORM setup is also completed automatically, so there is no failure in connecting to the DB.
52-
53-
Once the REST API endpoint interface is defined, the server controller implementation is examined by the type.
54-
The front is checked by the type to see if it is making an API request as defined in the interface.
55-
56-
[aspida: TypeScript friendly HTTP client wrapper for the browser and node.js.](https://github.com/aspidajs/aspida)
43+
Frourio-express is a framework for developing web apps quickly and safely in "One TypeScript".
5744

5845
<div align="center">
59-
<img src="https://frouriojs.github.io/frourio/assets/images/architecture.png" width="900" alt="Architecture of create-frourio-app" />
46+
<img src="https://frouriojs.github.io/frourio/assets/images/architecture.png" width="1200" alt="Architecture of create-frourio-app" />
6047
</div>
48+
<br />
49+
<br />
6150

6251
## Table of Contents
6352

6453
- [Install](#Install)
54+
- [Fastify.js mode](#Fastifyjs)
6555
- [Environment](#Environment)
6656
- [Entrypoint](#Entrypoint)
6757
- [Controller](#Controller)
@@ -109,9 +99,19 @@ Or with [yarn](https://yarnpkg.com/en/):
10999
$ yarn create frourio-app <my-project>
110100
```
111101

102+
<a id="Fastifyjs"></a>
103+
104+
## Fastify.js mode
105+
106+
Frourio-express uses express.js as its HTTP server.
107+
If you choose fastify.js in create-frourio-app, please refer to the following repositories.
108+
[GitHub: frourio](https://github.com/frouriojs/frourio)
109+
110+
Note: frourio is 5x faster than frourio-express
111+
112112
## Environment
113113

114-
Frourio requires TypeScript 3.9 or higher.
114+
Frourio-express requires TypeScript 3.9 or higher.
115115
If the TypeScript version of VSCode is low, an error is displayed during development.
116116

117117
## Entrypoint
@@ -120,7 +120,7 @@ If the TypeScript version of VSCode is low, an error is displayed during develop
120120

121121
```ts
122122
import express from 'express'
123-
import server from './$server' // '$server.ts' is automatically generated by frourio
123+
import server from './$server' // '$server.ts' is automatically generated by frourio-express
124124
125125
const app = express()
126126

@@ -167,7 +167,7 @@ export type Methods = {
167167
`server/api/tasks/controller.ts`
168168
169169
```ts
170-
import { defineController } from './$relay' // '$relay.ts' is automatically generated by frourio
170+
import { defineController } from './$relay' // '$relay.ts' is automatically generated by frourio-express
171171
import { getTasks } from '$/service/tasks'
172172

173173
export default defineController(() => ({
@@ -199,7 +199,7 @@ export type Methods = {
199199
`server/api/tasks/controller.ts`
200200
201201
```ts
202-
import { defineController } from './$relay' // '$relay.ts' is automatically generated by frourio
202+
import { defineController } from './$relay' // '$relay.ts' is automatically generated by frourio-express
203203
import { createTask } from '$/service/tasks'
204204

205205
export default defineController(() => ({
@@ -230,7 +230,7 @@ export type Methods = {
230230
`server/api/tasks/_taskId@number/controller.ts`
231231
232232
```ts
233-
import { defineController } from './$relay' // '$relay.ts' is automatically generated by frourio
233+
import { defineController } from './$relay' // '$relay.ts' is automatically generated by frourio-express
234234
import { findTask } from '$/service/tasks'
235235

236236
export default defineController(() => ({
@@ -244,7 +244,7 @@ export default defineController(() => ({
244244

245245
## Hooks
246246

247-
Frourio can use all of Express.js' middleware as hooks.
247+
Frourio-express can use all of Express.js' middleware as hooks.
248248
There are four types of hooks, onRequest / preParsing / preValidation / preHandler.
249249

250250
### Lifecycle
@@ -280,7 +280,7 @@ Directory level hooks are called at the current and subordinate endpoints.
280280
`server/api/tasks/hooks.ts`
281281

282282
```ts
283-
import { defineHooks } from './$relay' // '$relay.ts' is automatically generated by frourio
283+
import { defineHooks } from './$relay' // '$relay.ts' is automatically generated by frourio-express
284284
285285
export default defineHooks(() => ({
286286
onRequest: [
@@ -309,7 +309,7 @@ Controller level hooks are called at the current endpoint after directory level
309309
`server/api/tasks/controller.ts`
310310

311311
```ts
312-
import { defineHooks, defineController } from './$relay' // '$relay.ts' is automatically generated by frourio
312+
import { defineHooks, defineController } from './$relay' // '$relay.ts' is automatically generated by frourio-express
313313
import { getTasks, createTask } from '$/service/tasks'
314314

315315
export const hooks = defineHooks(() => ({
@@ -362,7 +362,7 @@ $ yarn add @types/passport --dev
362362

363363
```ts
364364
import passport from 'passport'
365-
import { defineHooks } from './$relay' // '$relay.ts' is automatically generated by frourio
365+
import { defineHooks } from './$relay' // '$relay.ts' is automatically generated by frourio-express
366366
import { getUserIdByToken } from '$/service/user'
367367

368368
// Export the User in hooks.ts to receive the user in controller.ts
@@ -690,7 +690,7 @@ https://github.com/expressjs/multer#multeropts
690690

691691
```ts
692692
import express from 'express'
693-
import server from './$server' // '$server.ts' is automatically generated by frourio
693+
import server from './$server' // '$server.ts' is automatically generated by frourio-express
694694
695695
const app = express()
696696

@@ -944,4 +944,4 @@ Ran all test suites.
944944
945945
## License
946946
947-
Frourio is licensed under a [MIT License](https://github.com/frouriojs/frourio/blob/master/packages/frourio/LICENSE).
947+
Frourio-express is licensed under a [MIT License](https://github.com/frouriojs/frourio-express/blob/master/LICENSE).

docs/assets/images/architecture.png

-24 KB
Binary file not shown.

docs/assets/images/ogp.png

-11.6 KB
Binary file not shown.

docs/assets/images/problem.png

-24.7 KB
Binary file not shown.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "frourio",
2+
"name": "frourio-express",
33
"version": "0.15.0",
44
"description": "Perfectly type-checkable REST framework for TypeScript",
55
"author": "Solufa <[email protected]>",
66
"license": "MIT",
77
"main": "dist/index.js",
88
"bin": "bin/index.js",
9-
"homepage": "https://github.com/frouriojs/frourio#readme",
9+
"homepage": "https://github.com/frouriojs/frourio-express#readme",
1010
"repository": {
1111
"type": "git",
12-
"url": "git+https://github.com/frouriojs/frourio.git"
12+
"url": "git+https://github.com/frouriojs/frourio-express.git"
1313
},
1414
"bugs": {
15-
"url": "https://github.com/frouriojs/frourio/issues"
15+
"url": "https://github.com/frouriojs/frourio-express/issues"
1616
},
1717
"files": [
1818
"dist"

0 commit comments

Comments
 (0)