Error: DataSource is not set for this entity.
at Function.getRepository
typeorm 에서 각 entity 들은 data source options 에 등록 되어있어야한다.
entities: ["src/entities/*.ts"],
이렇게 해 주니까 잘 됐다.
https://orkhan.gitbook.io/typeorm/docs/entities
저런 folder address 에서
src/js/**/*.js
이런 ** 이랑 * 이 무슨뜻인지 궁금해서 찾아봤다.
The double star in this case means all folders within the current folder, with the current folder being src/js
So in full, find all files with a .js extension, in all subfolders of src/js
** 은 현재 폴더의 모든 폴더를 뜻한다.
*.js 은 js 확장자의 모든 파일들을 뜻한다.
그래서 src/js/**/*.js
는 src/js 의 모든 서브폴더의 모든 js확장자 파일을 뜻한다.
The double asterisks are placeholders or instructions to the recursive interpreter to go through the files and folders.
It is a simple, recursive wildcard while only one asterisk means all without recursion.
'**/*.js'; All files with the extension .js from here onwards.
'lib/**/*.js'; All files with the extension .js in the folder lib and its subfolders.
'js/**'; All files in the folder js and its subfolders.
https://stackoverflow.com/questions/46547540/meaning-of-a-double-star-in-a-file-path
댓글