koa 프로젝트 세팅
nodejs 프레임워크 중에 express 말고 koa 라는 새로운 프레임워크를 사용해보고자 한다.
koa는 express 개발자들이 새롭게 만든 프레임워크라고 한다. 
기존에 사용하던 node를 가지고 koa를 개발하고자 하면
$ yarn add koa
$ yarn add koa-router
$ yarn add koa-bodyparser
error [email protected]: The engine "node" is incompatible with this module. Expected version "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4". Got "8.1.2"  
$ yarn add -D typescript
$ yarn add -D ts-node
$ yarn add -D nodemon
$ yarn add -D @types/koa
$ yarn add -D @types/koa-router
$ yarn add -D @types/koa-bodyparser
error @cspotcode/[email protected]: The engine "node" is incompatible with this module. Expected version ">=12". Got "8.10.0"
잘 읽어보면 node의 버전이 koa 개발하는데 있어서 중요한 역할을 한다는 것을 알 수 있다.
그러면 node의 버전을 업그레이드 시켜야 하는데...
방법은 여기 잘 나와있다.
혹시
throw new TypeError(``Unexpected ${nextType} at ${index},expected ${type});
와 같은 에러가 생긴다면, 
router.get('/*', async (ctx) => {
    ctx.body = 'koa-toy-side-project is starting~';
});라우팅 path를 보면 * 같은 이상한 삽질이 있다.
참고로 tsconfig.json 파일은
{
  "compilerOptions": {
    "target": "es5",                                
    "module": "commonjs",     
    "outDir": "./dist",           
    "strict": true,                                 
    "noImplicitAny": true,   
    "esModuleInterop": true,      
    "skipLibCheck": true,                           
    "forceConsistentCasingInFileNames": true        
  },
  "include": [
    "./src/**/*"
  ],
  "exclude": [
    "node_modules"
  ]
}와 같이 세팅하였다.
Author And Source
이 문제에 관하여(koa 프로젝트 세팅), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@jaymee/koa-프로젝트-세팅저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)