Skip to content

Commit

Permalink
Merge pull request #93 from frouriojs/develop
Browse files Browse the repository at this point in the history
chore(release): 0.17.2
  • Loading branch information
solufa authored Oct 13, 2020
2 parents 65b16a4 + 8c11c4a commit 2275cce
Show file tree
Hide file tree
Showing 11 changed files with 1,255 additions and 177 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.17.2](https://github.com/frouriojs/frourio/compare/v0.17.1...v0.17.2) (2020-10-13)


### Features

* optimize methodToHandler ([b8d4625](https://github.com/frouriojs/frourio/commit/b8d4625f86a8622ed428d570ce548a8db76a8d4a))


### Documentation

* add ja README ([a2c3107](https://github.com/frouriojs/frourio/commit/a2c3107f30fb1310c046684f4f6059ba426e8626))

### [0.17.1](https://github.com/frouriojs/frourio/compare/v0.17.0...v0.17.1) (2020-10-11)


Expand Down
57 changes: 53 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
</div>

<p align="center">Frourio is a perfectly type-checkable REST framework for TypeScript.</p>
<div align="center">
<a href="https://github.com/frouriojs/frourio#readme">🇺🇸English</a> |
<a href="https://github.com/frouriojs/frourio/tree/master/docs/ja#readme">🇯🇵日本語</a>
</div>
<br />
<br />
<br />
Expand Down Expand Up @@ -76,6 +80,7 @@ overhead.
- [Case 1 - Define GET: /tasks?limit={number}](#Controller-case1)
- [Case 2 - Define POST: /tasks](#Controller-case2)
- [Case 3 - Define GET: /tasks/{taskId}](#Controller-case3)
- [HTTP client](#HttpClient)
- [Hooks](#Hooks)
- [Lifecycle](#Lifecycle)
- [Directory level hooks](#Hooks-dir)
Expand All @@ -95,6 +100,9 @@ overhead.
- [Prisma](#ORM-prisma)
- [TypeORM](#ORM-typeorm)
- [CORS / Helmet](#CORS-Helmet)
- [Deployment](#Deployment)
- [Frontend](#Deployment-frontend)
- [Server](#Deployment-server)
- [Dependency Injection](#DI)

## Install
Expand All @@ -121,15 +129,15 @@ $ yarn create frourio-app <my-project>

## Express.js mode

Frourio uses fastify.js as its HTTP server.
If you choose express.js in create-frourio-app, please refer to the following repositories.
Frourio uses [Fastify](https://www.fastify.io/) as its HTTP server.
If you choose [Express](https://expressjs.com/) in create-frourio-app, please refer to the following repositories.
[GitHub: frourio-express](https://github.com/frouriojs/frourio-express)

Note: frourio is 5x faster than frourio-express

## Environment

Frourio requires TypeScript 3.9 or higher.
Frourio requires TypeScript >= v3.9 and Node.js >= v12.
If the TypeScript version of VSCode is low, an error is displayed during development.

## Entrypoint
Expand Down Expand Up @@ -260,9 +268,18 @@ export default defineController(() => ({
}))
```

<a id="HttpClient"></a>

## HTTP client

Use [aspida](https://github.com/aspida/aspida) for the frontend HTTP client.
(Frourio and aspida are maintained by the same developer)

Next.js also uses [@aspida/swr](https://github.com/aspida/aspida/tree/master/packages/aspida-swr).

## Hooks

Frourio can use hooks of fastify.js.
Frourio can use hooks of Fastify.
There are four types of hooks, onRequest / preParsing / preValidation / preHandler.

### Lifecycle
Expand Down Expand Up @@ -825,6 +842,38 @@ server(fastify, { basePath: '/api/v1' })
fastify.listen(3000)
```
## Deployment
Frourio is complete in one directory, but not monolithic.
Frontend and server are just statically connected by a type and are separate projects.
So they can be deployed in different environments.
<a id="Deployment-frontend"></a>
### Frontend
```sh
$ npm run build:front
$ npm run start:front
```
<a id="Deployment-server"></a>
### Server
```sh
$ npm run build:server
$ npm run start:server
```
or
```sh
$ cd server
$ npm run build
$ npm run start
```
<a id="DI"></a>
## Dependency Injection
Expand Down
Loading

0 comments on commit 2275cce

Please sign in to comment.