Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/42Seoul-LastDance/Backend
Browse files Browse the repository at this point in the history
…into 42Seoul-LastDance-develop
  • Loading branch information
Tolerblanc committed Sep 15, 2023
2 parents fb18394 + e16cbd1 commit f10f67d
Show file tree
Hide file tree
Showing 27,102 changed files with 5,559 additions and 3,024,851 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#.env

#nest
ft.client_id='u-s4t2ud-f0f8d4e13810d147a7fb0848c16cc1cbbebbbf9c6d353427710512de67a85cad'
ft.callback='http://localhost:3000/auth/callback'
ft.client_secret='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'

#database
POSTGRES_HOST=postgresql:5432
POSTGRES_USER_ID=root
Expand Down
39 changes: 19 additions & 20 deletions .github/.gitmessage
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
### 아래 명령어를 적용해주세요 !!!!
### git config --global commit.template .github/.gitmessage
# Subject 제목
# feat | 새로운 기능을 추가 |
# fix | 버그를 고친 경우 |
# style | 코드 포맷 변경, 세미 콜론 누락, 코드 수정이 없는 경우 |
# refactor | 코드 리팩토링 (기능 추가/수정/제거 없음) |
# commit | 필요한수 주석 추가 및 변경 |
# docs | 문서를 수정한 경우 |
# test | 테스트 추가, 테스트 리팩토링(프로덕션 코드 변경 X) |
# rename | 파일 혹은 폴더명을 수정하거나 옮기는 작업만인 경우 |
# remove | 파일을 삭제하는 작업만 수행한 경우 |
# 예시) feat : userSerivce

# Body 본문
# 예시) user 의 비즈니스 로직 추가
# game 점수를 보여주는 showGame(id)


# Footer 꼬리말
# issue 관리시 사용
# 예시) Closes #이슈번호
# Subject 제목
# feat | 새로운 기능을 추가 |
# fix | 버그를 고친 경우 |
# style | 코드 포맷 변경, 세미 콜론 누락, 코드 수정이 없는 경우 |
# refactor | 코드 리팩토링 (기능 추가/수정/제거 없음) |
# commit | 필요한수 주석 추가 및 변경 |
# docs | 문서를 수정한 경우 |
# test | 테스트 추가, 테스트 리팩토링(프로덕션 코드 변경 X) |
# rename | 파일 혹은 폴더명을 수정하거나 옮기는 작업만인 경우 |
# remove | 파일을 삭제하는 작업만 수행한 경우 |
# 예시) feat : userSerivce

# Body 본문
# 예시) user 의 비즈니스 로직 추가
# game 점수를 보여주는 showGame(id)

# Footer 꼬리말
# issue 관리시 사용
# 예시) Closes #이슈번호
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store
srcs/postgresql/*
*.png
*.jpeg
*.jpg
!default.png
.env

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.vscode/*
File renamed without changes.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ stest :
docker exec nest curl http://localhost:3000

xtest :
docker exec next curl http://localhost:3000
docker exec next curl http://localhost:4242

next :
docker exec -it next npx create-next-app srcs/my-app
docker exec next npm --prefix srcs/my-app run dev

<<<<<<< HEAD
.PHONY : all down clean fclean docker compile cntest run stop
=======
.PHONY : all down clean fclean docker compile cntest stest xtest next
>>>>>>> main
.PHONY : all down clean fclean docker cntest stest xtest next
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ services:
- nest:/usr/app/srcs
networks:
- my_network
env_file:
- ./.env
ports:
- "3000:3000"
restart: always
Expand Down
8 changes: 6 additions & 2 deletions services/nest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ FROM node:latest

WORKDIR /usr/app

COPY ./init_nest.sh /usr/app/

RUN apt-get update \
&& apt-get install -y dumb-init \
&& npm install -g npm \
&& npm install -g @nestjs/cli
&& npm install -g @nestjs/cli \
&& chmod 777 init_nest.sh


ENTRYPOINT ["/usr/bin/dumb-init", "--"]

CMD ["nest", "npm", "--prefix", "srcs", "run", "start:dev"]
CMD ["sh", "init_nest.sh"]
2 changes: 2 additions & 0 deletions services/nest/init_nest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm install --prefix srcs
npm run --prefix srcs start:dev
6 changes: 3 additions & 3 deletions services/postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ RUN echo "CREATE DATABASE ${DB_NAME};" > /docker-entrypoint-initdb.d/init_psql.s
echo "CREATE USER ${POSTGRES_USER_ID} WITH SUPERUSER PASSWORD '${POSTGRES_USER_PASSWORD}';" >> /docker-entrypoint-initdb.d/init_psql.sql && \
echo "GRANT ALL PRIVILEGES ON DATABASE ${DB_NAME} TO ${POSTGRES_USER_ID};" >> /docker-entrypoint-initdb.d/init_psql.sql && \
echo "\\\c ${DB_NAME};" >> /docker-entrypoint-initdb.d/init_psql.sql && \
echo "CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(255), profileUrl VARCHAR(255));" >> /docker-entrypoint-initdb.d/init_psql.sql && \
echo "INSERT INTO users (name) VALUES ('pongmaster');" >> /docker-entrypoint-initdb.d/init_psql.sql && \
echo "ALTER TABLE users OWNER TO ${POSTGRES_USER_ID};" >> /docker-entrypoint-initdb.d/init_psql.sql && \
# echo "CREATE TABLE users (id SERIAL PRIMARY KEY, name VARCHAR(255), profileUrl VARCHAR(255));" >> /docker-entrypoint-initdb.d/init_psql.sql && \
# echo "INSERT INTO users (name) VALUES ('pongmaster');" >> /docker-entrypoint-initdb.d/init_psql.sql && \
# echo "ALTER TABLE users OWNER TO ${POSTGRES_USER_ID};" >> /docker-entrypoint-initdb.d/init_psql.sql && \
echo "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ${POSTGRES_USER_ID};" >> /docker-entrypoint-initdb.d/init_psql.sql && \
echo "GRANT ALL PRIVILEGES ON SCHEMA public TO ${POSTGRES_USER_ID};" >> /docker-entrypoint-initdb.d/init_psql.sql

Expand Down
46 changes: 23 additions & 23 deletions srcs/nest/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'prettier'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
36 changes: 36 additions & 0 deletions srcs/nest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# compiled output
dist
node_modules

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.vscode/*
8 changes: 5 additions & 3 deletions srcs/nest/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all"
}
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 4,
"useTabs": false
}
6 changes: 0 additions & 6 deletions srcs/nest/dist/app.controller.d.ts

This file was deleted.

33 changes: 0 additions & 33 deletions srcs/nest/dist/app.controller.js

This file was deleted.

1 change: 0 additions & 1 deletion srcs/nest/dist/app.controller.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions srcs/nest/dist/app.module.d.ts

This file was deleted.

37 changes: 0 additions & 37 deletions srcs/nest/dist/app.module.js

This file was deleted.

1 change: 0 additions & 1 deletion srcs/nest/dist/app.module.js.map

This file was deleted.

3 changes: 0 additions & 3 deletions srcs/nest/dist/app.service.d.ts

This file was deleted.

19 changes: 0 additions & 19 deletions srcs/nest/dist/app.service.js

This file was deleted.

1 change: 0 additions & 1 deletion srcs/nest/dist/app.service.js.map

This file was deleted.

1 change: 0 additions & 1 deletion srcs/nest/dist/main.d.ts

This file was deleted.

10 changes: 0 additions & 10 deletions srcs/nest/dist/main.js

This file was deleted.

1 change: 0 additions & 1 deletion srcs/nest/dist/main.js.map

This file was deleted.

1 change: 0 additions & 1 deletion srcs/nest/dist/tsconfig.build.tsbuildinfo

This file was deleted.

1 change: 0 additions & 1 deletion srcs/nest/git/HEAD

This file was deleted.

Loading

0 comments on commit f10f67d

Please sign in to comment.