Skip to content

wonjuneee/anytime-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

์–ธ์ œ๋“ ์ง€

์ด ํ”„๋กœ์ ํŠธ๋Š” ๊ฐœ์ธ์˜ ์ผ์ •์„ ํ†ตํ•ฉํ•ด ๋ชจ์ž„์˜ ์ผ์ •์„ ์‰ฝ๊ฒŒ ์ •ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ฃผ๋Š” ์›น ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค. ๊ฐ์ž ๊ฐœ์ธ์˜ ์ผ์ •์„ '๊ฐœ์ธ ์ผ์ •'ํŽ˜์ด์ง€์—์„œ ๋“ฑ๋กํ•˜๊ณ  '์‚ฌ์  ๋ชจ์ž„'์„ ์ƒ์„ฑํ•˜์—ฌ ์นœ๊ตฌ๋ฅผ ์ดˆ๋Œ€ํ•œ ๋’ค ๊ฐ์ž์˜ ์ผ์ •์„ ๋น„๊ตํ•ด ์ตœ์ ์˜ ๋ชจ์ž„ ์ผ์ •์„ ์ •ํ•ด๋ณด์„ธ์š”!

์‹คํ–‰๋ฐฉ๋ฒ•

  • database

์ƒ์„ฑ๊ธฐ๋ณธ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๊ด€๋ฆฌ ์‹œ์Šคํ…œ(DBMS)์€ MySQL/MariaDB์ž…๋‹ˆ๋‹ค. MySQL ๋˜๋Š” MariaDB๋ฅผ ์„ค์น˜ํ•˜๊ณ  ์›ํ•˜๋Š” ์ด๋ฆ„์˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์ƒ์„ฑํ•˜์„ธ์š”. ๋‹ค๋ฅธ DBMS๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด src/config ๋””๋ ‰ํ† ๋ฆฌ์— ์žˆ๋Š” dataSource.ts ํŒŒ์ผ์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • .env.dev ํŒŒ์ผ ์ƒ์„ฑ
CLIENT_URL=http://localhost:4000

PORT=3000 # port on which the server will listen

DB_HOST=localhost # host(ip) of the database
DB_PORT=3306 # port of the database
DB_USER=root # username of the database
DB_PASSWORD=pwd # password of the database
DB_NAME=example # name of the database, which you created in the previous step

๋ฅผ ์ž‘์„ฑํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๊ทธ ํ›„

npm install
npm run dev

๋ฅผ ํ•˜์‹œ๋ฉด http://localhost:3000์—์„œ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6