Skip to content

Commit

Permalink
v1.0.0 (#95)
Browse files Browse the repository at this point in the history
* Feature: establish PostgreSQL, MongoDB, Redis database connection (#1)

* Feat: establish PostgreSQL database connection

* Feat: establish MongoDB database connection

* Feat: establish Redis database connection

* Feat: separate dev and production db

* Style: separate down exported functions in database modules

* Feat: create format validation utility (#4)

* Feat: exception utility

* Fix: exception.js
- rename throwing json key errorCode to statusCode
- remvoe return false, 검사에서 걸리면 throw되므로 필요없는 코드임

* Fix : method export

* Fix: fix return values
- 유효성 검사에 실패하면 statusCode, where, reason을 throw해준다

* Fix: erase JSON.stringfy

* Fix: alter variable names more clearly

* Fix: alter regexp
-부정확한 정규표현식을 수정함

* Feat: add validation test
-/user 경로로 유효성 검사 테스트 할수 있는 라우터 추가

* Fix: remoove JSON.stringify

* Fix: router address
라우터 주소를 /user에서 /validation으로 변경

* Fix: erase JSON.Stringifty

* Style: rename import validation name
-validation으로 더욱  명확하게 변경

* Style: add enter between line 11 and line12
change return string

* Fix: rename args name resaons to messages

* Style: rename return message
checkRegExp와 checkSame이 return하는 문자열을 변경하습니다

* Refactor: change function combine's algorithms
-func의 return값을 json으로 받아온다
-isValid가 false라면 message KEY를 참조하여 그 것을 전송할 messages 배열에 push한다

* Refactor: change function combine's algorithms
-func의 return값을 json으로 받아온다
-isValid가 false라면 message KEY를 참조하여 그 것을 전송할 messages 배열에 push한다

* Fix: update locations and their usages (#6)

* Rename: rename models/ -> model/

* Fix: use absolute path to use mongodb module

* Refactor: provide only redis client object

* Refactor: provide only redis client object rather than creating all of redis function callers

* Fix: use redisClient directly in redis test api handler

* Comment: describe redis connect() async call

* Style: rewrite throwing JSON message (#8)

- 두 번째 키 값을 targetString에서 message로
- 두 번째 value 값을 변경

* Feat: enable custom exception handler and its test apis (#9)

* Feat: enable custom exception handler
handler reads key {statusCode}, {message}, {messages} of the error object
prints stacktrace on server side error

* Fix: make nothing appended to errorMessage if no {messages} given

* Feat: kakao OAuth register, login, deletion (#10)

* Feat: enable Kakao OAuth signin

* Feat: enable Kakao OAuth unlink feature

* Fix: load redis using babel path resolver

* Refactor: set default nickname NULL when signing up with kakao oauth callback

* Refactor: separate utility for session management (#12)

* Feat: create session data getter

* Fix: correct the name of session id format in session util src

* Refactor: use getSession() to check session

* Refactor: use setSession() to create a session

* Rename: rename setSession to createSession()

* Refactor: use destroySession() to destroy session

* Refactor: Separate Kakao OAuth REST API Call Code (#14)

* use getToken() to get kakao jwt from kakao utility

* Feat: use unlink() to unlink Kakao account from service

* Fix: set cookie path to root (#16)

* Feat: check login status via user ID and reviewed session-related code (#17)

* Feat: set/delete string to redis to track session with user ID in Redis

* create sign in check function in session utility

* Feat: apply user db schema change (#18)

* Feat: create SMS authentication and checking API (#19)

* Feat: create SMS authentication feature

* Feat: create SMS authentication check feature

* Feat: create SMS authentication feature

* Feat: create SMS authentication check feature

* Style: contain variable name in result when error

* Fix: check phone number format 010-XXXX-XXXX

* Fix: check phone number to check auth code (#20)

* Fix: check phone number to check auth code

* fix: remove redundant allocation and fix exception format

* Feat: Implemented user routers as defined in the API specification in notion (#21)

* Feat: make temp smsAuth Generator

* Feat: make register router

* Feat: make login/out router

* Fix : rewrite cookie path

* Fix: phone validation check logic
-논리연산이 &&이 아닌 || 이였어야한다. 수정완료

* Fix: phone validation check logic
-smsAuth의 key값을 올바르게  수정완료

* Feat: get user's info using index

* Feat: check multi-login using function isSignedIn()

* Style: erase passing kakaoToken code when using function createSession

* Feat: wrtie find rotuer skeleton

* Style: Improved clarity of comments
- 각 라우터의 시작은 Permission 검증부터 시작합니다 중복코드가 다소 발생하므로 module화도 생각해볼수 있겠습니다.
- 이후 쿠키, 패스, 쿼리, body 에서 매개변수를 받아옵니다
- 휴대폰 인증 성공 확인이 필요한 라우터는 휴대폰 인증 성공 여부 확인 후 처리를 진행합니다.
- 이후 각 라우터에서  적절한 데이터 베이스 통신을 시도합니다

* Fix: erase unnecessary logic

* Refactor: move tempAuth-code rotuer to test.js

* Style: change expired time to process.env

* Fix: Add checking smsAuthid is Existed logic Remove chekcing unique is duplicated
- smsAuthid가 존재하는지 검증하는 로직 추가
- unique key가 중복되는지 검증하는 로직 삭제

* Feat: using uuid midleware in test.js

* Fix: using correct ADMIN_AUTHORITY number in user searching router

* Fix: remove unnecessary query request
- 닉네임 동일여부 검증 쿼리 제거
- nickname에 전달해주는 닉네임 value의  형식 변경

* Style: change searching logic in specal case searching

* Feat: add parameter validation checking in special case searching

---------

Co-authored-by: Godbell <[email protected]>

* Fix: resolve errors after merge (#23)

* Feat: notice API (#22)

* Fix: check phone number to check auth code

* Feat: create POST /notice

* Feat: create GET /notice/:noticeId

* Fix: validate permission properly

* Fix: refer ADMIN_AUTHORITY from test.js

* Fix: refer ADMIN_AUTHORITY from test.js

* Feat: create DELETE /notice/:noticeId

* Fix: check is_deleted un notice handlers

* Fix: throw error when no notice found

* Feat: create GET /notice/list

* Feat: create GET /notice/search

* Fix: correct RegExp

* Fix: correct field name of error status to statusCode

* Feat: implement report API (#24)

* Feat: create S3 upload feature (#25)

* Feat: import middlewares

* Docs: downgrade multer and add script.monitor
- babel과 호환을 위한 multer 다운그레이드
- 글로벌로 설치된 nodemon 실행을 위한 npm run monitor 추가

* Feat: fileupload test router

* Feat: multer with detecting magic number
- 매직넘버를 통해 진짜 확장자를 알아낸다
- 서드파티 데이터베이스를 위한 설정들을 추가한다

* Feat: fileAnzalyzer with multer
- fileAnalyzer에서 통과된 파일만 S3-fileUpload에 pipeline하여 fetch 해준다

* Feat: option allowedExtensions

* Fix: erase annotation

* Docs: pr again

* Feat: change return structure of fileAnalyzer
- text: form-data에서 주어진 text
- file: 업로드된 파일의 valid와 업로드 주소 또는 err message

* Style: adjust err message

* Feat: fix wrong conference

* Style: change key params

* Fix: improve error handle logic
- 에러핸들링 로직 개선
- abort를 각 fetch마다 독립적으로  수행
- 에러가 발생하면 파일 수로 카운팅 하지않음

* Feat: add check authorization mode

* re commit

* "Feat: add using fileAnalyzer Example"

- 쓰는 예시 추가

* Fix: request change 1st

* Docs: rename by kebab style

* Docs: remove files

* Chore: add jsconfig.json for intellisense (#26)

* Refactor: separate non-controller related middleware (#27)

* Fix: returns null from getSession() if session invalid

* Fix: add null check to isSignedIn()

* Feat: add session check middlewares per authority

* Chore: add jsconfig.json for intellisense (#26)

* Refactor: apply session check middleware

* Fix: remove redundant import in notice router

* Refactor: apply session check middleware to report router

* Feat: add guest only middleware

* Fix: call next() when end of allowGuestOnly middleware

* Refactor: apply session check middleware to user router

* Rename: move middleware to its own directory

* Feat: apply sign in form validation middleware

* Refactor: apply signup form check middleware

* Refactor: apply auth code query check  middleware

* Refactor: apply auth code check form validation middleware

* Rename: remove redundant suffix

* Style: remove redundant Initialization

* Fix: set proper name and fix typo

* Refactor: apply user modification form check middleware

* Refactor: apply signin check middleware to user GET

* Refactor: apply middlewares to find id

* Refactor: apply middlewares to reset password

* Refactor: apply GET search validation middleware

* Style: remove redundant validation import in user router

* Refactor: apply POST report validation middleware

* Refactor: apply GET report search validation middleware

* Refactor: apply PUT report validation middleware

* Refactor: apply GET report validation middleware

* Fix: remove redundant defaults of destructured values in report middleware

* Fix: remove redundant defaults of destructured values in user middleware

* Fix: set user search filters optional

* Refactor: apply POST notice validation middleware

* Refactor: apply GET notice search validation middleware

* Refactor: apply notice index path param validation middleware

* Fix: return object from checkIsNumber in validation.js in proper format

* Fix: fix function isNumber() AND add missing import  (#28)

* Fix: return inversed result from isNumber validation

* Fix: import missing validation module to page middlewarre

* Fix: edit notice, report, user router for returning last page  (#29)

* Feat: returns last page index from notice list

* Feat: returns last page index from report search

* Refactor: rename query result in notice list to result

* Feat: returns last page index from user search

* Feat: create length 0 result

* Refactor: rename key result to list in user search response

* Feat: create length 0 result in notice search

* Fix: paginate user search result

* Feat: create username availability check api (#30)

* Feat: create username availability check api

* Fix: validate username length in validateUsername()

* Refactor: configure custom multer

* Feat: remake fileanalyzer to kkujjang-multer

* Feat: filename exeception handler
- 파일 이름이 200자 초과면 업로드 안함

* Style: add examples in test.js

* Feat:

* Style: add example subkey

* Style: change default allowed Extension

* Style: remove console.log

* Refactor: chagne file dir of kkujjang-multer

* Fix: reflect comment v1

* Fix: reference dir of kkujjang-multer

* Fix: reflect comment V2

* Rename: move S3.js

* Remve: utility/multer.js

* Fix: resolve session js null reference problem and rename signin param

* Fix: session.js AND middleware/user.js
- session.js : await getSessionByUserId(userId) 가 null을 반환할 경우 기존 코드에서는 userId를 가져오려고시도하면 오류가 발생합니다 따라서 null일 경우 빈 JSON을 할당하여 undefined로 가져오게합니다
- user.js : login시에도 userId는 username으로 받아와야합니다

* Style: restore regexp

* Feat: number range validation AND edit page number execption handling (#33)

* replace Number() to parseInt() for space string\ check

* Feat: add range based comparison validator

* Refactor: rename range based validator and provide details in message

* Fix: correct condition

* Refactor: use checkIsInNumberRange() to validate page Number

* Refactor: apply same format of page index load

* Fix: validation throw AND number input handling (#34)

* Fix: correct isBanned usage in query in user search API

* Fix: correct validation number checker usage to use strings only

* Refactor: throw immediately when validation fails

* Refactor: rename funcs to args now that there can be non-functions

* Refactor: remove redundant default null

* Fix: get boolean for report type option

* Feat: web socket AND game base (#37)

* Chore: install express-ws

* Fix: apply package-lock.json

* Chore: add @socket, @GAMe path aliases

* Feat: create websocket game base

* Comment: comment out session validation

* Refactor: remain only s3 upload and its validations in custom multer script

* Refactor: multer

* Feat: multer

* Refactor: multer option input logic

* Rename: move utility functions

* Docs: remove filecount router in  /test

* Feat: create regexp test api

* Refactor: optimize and style sql queries

* Style: change password regExp

* Style: password regexp

* Refactor: query string

* Refactor: user router

* Feat: not allowed nickname
- 닉네임에 포함시키면 안되는 단어 배열 추가

* Refactor: query result reference
- rows[0]참조에서 rows참조로 변경

* Refactor: query result reference
- rows[0]참조에서 rows참조로 변경

* Style: change nickname style storing in databse

* Feat: create /inquiry api

* Feat: inquiry

* Feat: test input type AND regExp
- 입력값 타입 검증과 입력한 정규표현식으로 그 입력값을 검증해보는 라우터

* Feat: inquiry router

* Feat: inquiry router

* Refactor: router inquiry

* Feat: multer

* Style: chagne column name
- inquiry_thread.inquiry_id를 inquiry_thread.inquriy_start_id로 변경

* Style: column name threadType to type

* Feat: inquiry router

* Fix: get nickname logic in /inquiry/:inquiryId

* Refacotr: inquiry query string to handler AND kkujjang multer
- 쿼리스트링 생성 부분을 라우터 핸들러로
- kkjjang multer를 자체 미들웨어로
key로 콜백함수 또는 문자열을 입력받는다

* Refacotr: inquiry query string to handler AND kkujjang multer
- 쿼리스트링 생성 부분을 라우터 핸들러로
- kkjjang multer를 자체 미들웨어로
key로 콜백함수 또는 문자열을 입력받는다

* Style: upload reference

* Style: fix typo in inquiry router nick to nickname (#40)

오타수정

* Feat: kakao sign out / resign And improve login code (#42)

* Feat: add kakao signing out feature

* Feat: redirect to given url after oauth signin

* Feat: validate kakao signin request

* Feat: unlink kakao account when delete user

* Fix: rollback signout query, will be handled in other pr

* Refactor: User API 

* Feat: modify sign up api to check duplication

* Fix: check if deleted user when signin

* Comment: clarify isSignedIn() usage in signin api

* Fix: check is deleted when password reset

* Refactor: format POST /find/id handler

* Refactr: separate sms auth session creation to sms-auth.js

* Refactor: separate auth code authorization

* Refactor: build user get query to check authority

* Fix: check is deleted when finding user id

* Refactor: separate nickname validation to middleware

* Refactor: /report API SQL query

* Refactor: use ARRAY_AGG and JSON_BUILD_OBJECT to build search result array

* Refactor: remove redundant default null

* Fix: respond with object, not array from report search

* Style: arrange indentation of query

* Feat: create socket prototype (#43)

* Feat: socket prototype

* Feat: socket prototype

* Style: fix incorrect text

* Style: fix incorrect text

* Rename: move htmo to public folder

* Feat: enable file upload and view files at notice api (#45)

* Feat: enable file upload and view files at notice api

* Fix: check if signed in on other device and check duplication on kakao signup

* Refactor: define default nickname into global config file

* Fix: correct typo

* Refactor: provide 'notice' for argument to represent the file loc

* Refactor: user API with setting a default nickname when registering through Kakao

* Fix: check if signed in on other device and check duplication on kakao signup

* Refactor: define default nickname into global config file

* Fix: correct typo

* Fix: add project root to path alias: @

* Style: arrange indentations

* Feat: create ranking route (#48)

* Feat: ranking

* Refactor: move schdule function to utility/ranking

* Refactor: select query in /ranking

* Feat: game socket

* Feat: create game main structure

* Fix: complete structure

* Feat: connect korean dictionary api

* Feat: record turn count

* Feat: apply round word and score calculation

* Feat: check used words

* Refactor: check if not true to check used word

* Chore: set ecmascript version to es6 and to check js

* fix: resolve local variable reference error

* Fix: set module to commonjs

* Refactor: validate cookie string

* Feat: add error message preset

* Feat: create (dis)connection, room enter/exit event according to oop

* Fix: return index when ready state and room owner changed

* TODO: work from start game event

* TODO: work on start round

* Feat: add start turn

* Fix: normalize game start feature

* Refactor: get callback by destructuring

* Feat: add startturn, TODO: remove game calss

* TODO: create chat handler

* Refactor: rename onSuccess to onComplete

* Fix: send round result when round end

* Fix: set room state at constructor

* Feat: complete say world

* Fix: match password reset api with front necessity

* Rename: split the passwordchange router into two
- 첫번째 라우터 : username과 phone을 받아 검증 및 쿠키 생성
- 두번째 라우터 : cookie의 authId를 바탕으로 세션 접근, 비밀번호 변경

* Fix: fix typo

* Fix: typo 2

* !BREAKING CHANGE: configure monorepo with nx (#52)

* Chore: install lerna for monorepo configuration

* Chore: fix lerna version to 8.0.2

* Chore: configure lerna.json

* Chore: separate mongodb into a package

* Document: correct author and repo data

* Document: specify version of mongodb package to 1.0.0

* Chore: separate postgres into a package

* Chore: rename mongodb to mongo-pool to distinguish with mongodb package

* Chore: separate redis client script

* Refactor: rename mongodb script mongo-pool

* \!BREAKING CHANGE: configure nx mono repo

* Feat: create socket exception handler AND cors options (#53)

* Feat: roomNumber

* Fix: typo

* Feat: socket exception handler
- 게임방에서 다른 게임방 접속 불가
- 게임방번호 추가

* Feat: handle exceptions of user signed in already and exitting during the game  (#54)

* Refactor: send room info when user quit

* Feat: end round/game when user is out while gaming

* Feat: switch state of room when game end

* Feat: disconnect if already signed in other device

* Fix: import session from proper location

* Feat: validate other device signin and api server signin

* Feat: add avatar url to database (#55)

* Feat: avatar url

* Style: public

* Fix: avatar url to avatar index

* Fix: avatar url to avatar index

* Fix: avatar url to avatar index

* Style: erase unused parameter

* Style: change allowed avatar index

* Refactor: avatar index validation logic

* Refactor: change column name avatar_index to avatar_accessory_index (#57)

* Style: avatar index to avatar acc index'

* Style: acc to accessory

* Chore: configure docker compose (#56)

* Chore: configure docker compose

* Fix: fix compose for production

* Chore: change avatar customize column name

* Feat: add timeout to game procedure (#58)

* Feat: emit load game and destory room to client (#59)

* Feat: emit load game and destory room  to client

* Feat: add key name roomId

* Feat: add key name roomId

* Feat: add change room config, update room member count feature (#60)

* Feat: emit load game and destory room  to client

* Feat: add key name roomId

* Feat: add key name roomId

* Feat: change room config

* Feat: change room config

* Style: erase blank

* Fix: change information type when change room config

* Feat: update user count

* Fix: emit data type

* Rename: validation.js

* Rename: validation.js

* Refactor: fucntion name

* Feat: create /chat router and relevant system (#61)

* Feat: create chat load

* Comment: fix chat log jsdoc

* Feat: apply chat upload feature

* Feat: create chat router middleware

* Refactor: rename chat log attribute created_at to createdAt

* Feat: allow all origins when dev (#62)

* Chore: remove expose from dockerfiles (#63)

* Feat: add /user/me to check my profile (#64)

* Feat: require header for auth, not cookie (#65)

* Feat: allow all origins when dev

* Feat: require header for auth, not cookie

* Feat: include authorityLevel in signing responses (#66)

* Feat: create room, game logger (#67)

* Feat: room logger

* Fix: restore cors

* Fix: wrong data parameter

* Fix: erase unused parameter

* Style: room logger

* stye: var name

* Fix: left join notice file for no file cases (#68)

* Fix: get header with req.get() (#69)

* Feat: include authorityLevel in signing responses

* Fix: get header with req.get()

* Feat: set the name of created time key to createdAt (#70)

* Fix: when file is not exist

* Feat: restore name createdAT

* Fix: lowercase session ID header for socket handler (#71)

* Fix: when file is not exist

* Feat: restore name createdAT

* Fix: upper case problem
- test.html도 일부 수정

* Fix: restore pw change feature (#72)

* Fix: when file is not exist

* Feat: restore name createdAT

* Fix: upper case problem
- test.html도 일부 수정

* Fix: validation logic

* Style: remove enter

* Feat: create dummy word when no available roundword (#73)

* Feat: provide room owner user index from full info

* Feat: create dummy string when the affordable roundword doesn't exist

* Feat: apply Front-End suggestions (#75)

* Fix: errors in socket

* Fix: console code

* Feat: add key createdAt in inquiry router (#76)

* Fix: errors in socket

* Feat: add key createdAt in inquiry router

* Fix: resolve socket related errors (#77)

* Feat: reset ready state after game end

* Fix: when word length is 1

* Fix: not delete #users..roomid after leaving room

* Feat: handling api connection Error

* Style: tri equal symbol

* Style: return in catch

* Fix: execute resumeTimer in finally

* Fix: not to initalize roundTimeLeft when round proceeding

* Style: remove annotation

* Fix: initialize avatar index when kakao signup (#78)

* Fix: initialize avatar index when kakao signup

* Refactor: use config for avatar index

* Fix: update left time with roundTimeLeft value, not roundTimeLimit (#79)

* Fix: inquiry filter number range (#80)

* Feat: 1.Feature/ban | 2.rabbitMQ docker compose | 3.socket session | 4.docker compose timezone (#81)

* Feat: ban router skeleton

* Feat: before getSession logic

* Feat: socket server session

* Feat: setup docker-compose

* Feat: docker-compose TZ env

* Style: ban router post to put

* Docs: wrtie jsdoc

* Docs: .gitignore

* Refactor: change request type JSON to form-data (#82)

* Style: JSON to form-data

* Fix: duplicated code

* Feat: add redis Flushall to test router (#83)

* Fix: validate value existance properly at report search (#84)

* Fix: load report search params from query not body

* Feat: validate page number existance and range

* Fix: set query params null when they're undefined

* Feat: add date sort filter

* Feat: add isHandled filter to report search

* Feat: set roomId when /report POST reqeust   (#85)

* Feat: get roomId

* Feat: update room id in kkujjang.report using msgQ

* Feat: return roomId in /:reportId

* Style: function name

* Fix: fix api bugs (#86)

* Feat: set roomId when /report POST reqeust   (#85)

* Feat: get roomId

* Feat: update room id in kkujjang.report using msgQ

* Feat: return roomId in /:reportId

* Style: function name

* Feat: erros in api & logger

* Style: no cotent in notice list

* Style: notice response

* Style: restore note

* Fix: sort logic
- oldest가 내림차순으로 되어있던 코드 수정

* Feat: upload exp and level when game ends (#87)

* Feat: upload exp and level when game ends

* Feat: include exp and level gain data to game result

* Fix: map msgq port to env(#88)

* chore: set rabbitmq port number to env value in docker compose (#89)

* Style: docker compose

* Docs: correct docs name

* Fix: increase avatar accessories max index (#90)

* Fix: validation target

* Feat: max avatar acc index

* Style: Update global.js

* Feat: try agian when Korean Dict API connection failed (#91)

* Feat: adjust say word failure score to -50 (#92)

* Fix: define httpsServer to enable access to socket api (#94)

* modify docker compose for ssl (#93)

* Chore: add docker compose build command

* Chore: add .env.dev and .env.prod to gitignore

* Chore: separate prod and dev env and set to use it in compose

* Chore: load env when production build

* Chore: revert not to include env when build

* Chore: include ssl cert dir as volumes

* Chore: differ compose between dev and prod

* Chore: setup dev compose properly, separate container names

* Docs: add readme for dev

* Fix: correct readme file name

---------

Co-authored-by: 굴소스 <[email protected]>
  • Loading branch information
Godbell and GulSauce authored Aug 5, 2024
1 parent df17933 commit fca2791
Show file tree
Hide file tree
Showing 93 changed files with 10,960 additions and 5,216 deletions.
16 changes: 0 additions & 16 deletions .babelrc

This file was deleted.

140 changes: 140 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.nx/cache/
.vscode/
.eslintrc.json
.gitignore
.git/
.prettierrc
Dockerfile**
docker**
data/
60 changes: 60 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
HTTPS_PORT=
HTTP_PORT=
WSS_PORT=
WS_PORT=

SSL_KEY_LOCATION=
SSL_CRT_LOCATION=
SSL_CA_LOCATION=

PGPORT=
POSTGRES_HOST=
POSTGRES_NAME=
POSTGRES_TEST_NAME=
POSTGRES_USER=
POSTGRES_PASSWORD=

MONGODB_PORT=
MONGODB_HOST=
MONGODB_NAME=
MONGODB_TEST_NAME=
MONGODB_USER=
MONGODB_PASSWORD=
MONGO_INITDB_ROOT_USERNAME=
MONGO_INITDB_ROOT_PASSWORD=

REDIS_PORT=
REDIS_HOST=
REDIS_PASSWORD=
REDIS_DB=
REDIS_TEST_DB=

KAKAO_REDIRECT_URI=
KAKAO_REST_API_KEY=

SEMDM_REST_API_KEY=
SENDM_ID=
SEMDM_CALLER_NUMBER=

SESSION_EXPIRES_IN=
PASSWORDCHANGE_SESSION_EXPIRES_IN=
TEST_PHONE_VALIDATION_EXPIRES_IN=

ADMIN_AUTHORITY=
STDICT_KOREAN_API_KEY=

AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_BUCKET_NAME=
AWS_BUCKET_ACL=

RABBITMQ_PORT=
RABBITMQ_MANAGER_PORT=
RABBITMQ_HOST=
RABBITMQ_DEFAULT_USER=
RABBITMQ_DEFAULT_PASS=
USER_BANNED_QUEUE_NAME=
ROOMID_UPDATE_QUEUE_NAME=

TIME_ZONE=Asia/Seoul
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ web_modules/

# dotenv environment variable files
.env
.env.dev
.env.prod
.env.development.local
.env.test.local
.env.production.local
.env.local
env.local
env.docker

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down Expand Up @@ -127,4 +131,9 @@ dist
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.pnp.*

.nx/cache
docker-compose.yaml

cert/
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
}
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.indentSize": "tabSize"
"editor.indentSize": "tabSize",
"javascript.updateImportsOnFileMove.enabled": "always"
}
9 changes: 9 additions & 0 deletions Dockerfile.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:lts-bookworm

WORKDIR /app

COPY ./ ./

RUN npm install

CMD npm run start:api-server
9 changes: 9 additions & 0 deletions Dockerfile.game
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:lts-bookworm

WORKDIR /app

COPY ./ ./

RUN npm install

CMD npm run start:game-server
10 changes: 10 additions & 0 deletions data/mongodb/init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
db.createUser({
user: process.env.MONGO_INITDB_ROOT_USERNAME,
pwd: process.env.MONGO_INITDB_ROOT_PASSWORD,
roles: [
{
role: 'readWrite',
db: process.env.MONGO_INITDB_DATABASE,
},
],
})
Loading

0 comments on commit fca2791

Please sign in to comment.