Page 385 - Nodejs 교과서 개정2판
P. 385
ݢ OPEFCJSEۄח ಫ؊ܳ ٟ݅פ ೦࢚ QBDLBHF KTPOਸ ઁੌ ݢ ࢤࢿ೧ঠ פ QBDLBHF KTPOਸ ࢤࢿ
೧ח npm init ݺ۸যܳ ࣛীࢲ ഐ೧ب غҊ ٜ݅যب ؾפ versionա description author
licenseח ਗೞח ۽ ਬ܂ѱ ࣻ೧ب ҡଳणפ TDSJQUT ࠗ࠙ী start ࣘࢿ ݈Ҋ ֍যঠ פ
package.json
{
"name": "nodebird",
"version": "0.0.1",
"description": "익스프레스로 만드는 SNS 서비스",
"main": "app.js",
"scripts": {
"start": "nodemon app"
},
"author": "ZeroCho",
"license": "MIT"
}
OPEFCJSE ಫ؊ উী QBDLBHF KTPOਸ ࢤࢿ೮ݶ ઁ द௬ۄૉܳ ࢸפ ۽ંীࢲח /P42-
न 42- .Z42- ਸ ؘఠ߬झ۽ ࢎਊೡ Ѫੑפ ࢎਊ৬ ѱदޛ р ѱदޛҗ ೧दకӒ р ҙ҅о
ਃೞ۽ ҙ҅ഋ ؘఠ߬झੋ .Z42-ਸ ࢶఖ೮णפ
콘솔
$ npm i sequelize mysql2 sequelize-cli
$ npx sequelize init
npm i sequelize mysql2 sequelize-cli ݺ۸যܳ ഐೞݶ OPEF@NPEVMFT ಫ؊৬ QBDLBHF MPDL KTPO ࢤ
ࢿؾפ ژೠ npx sequelize init ݺ۸যܳ ഐೞݶ DPOGJH NJHSBUJPOT NPEFMT TFFEFST ಫ؊о ࢤࢿؾ
פ npx ݺ۸যܳ ࢎਊೞח ਬח ࢸ npm i -g ܳ ೖೞӝ ਤ೧ࢲੑפ
ઁ ܲ ಫ؊ب ࢤࢿפ మ݁ ੌਸ ֍ਸ WJFXT ಫ؊ ۄఠܳ ֍ਸ SPVUFT ಫ؊ ੌਸ ֍ਸ Q
VCMJD ಫ؊о ਃפ ীࢲ ࢸݺೡ QBTTQPSU ಁఃܳ ਤೠ QBTTQPSU ಫ؊ب ٟ݅פ
݄݃ਵ۽ झۨझ ࢲߡ ٘о ӡ BQQ KT৬ ࢸчٜਸ ਸ FOW ੌਸ OPEFCJSE ಫ؊ উী ࢤࢿפ
ಫ؊ ҳઑח җ эणפ