Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sequelize-auto로 로컬에 있는 DB 테이블 코드로 만들기 #11

Open
yanghaemi opened this issue Aug 9, 2024 · 0 comments
Open

Comments

@yanghaemi
Copy link
Owner

npm i sequelize-auto
npm i -g sequelize-cli
npm i mysql2 또는 mariadb

config에 연결할 db 정보 적어주고 (최신 코드엔 .env랑 연결 되어있을 것)

sequelize-auto -o "./models" -d cosmica -h localhost -u root -p 3307 -x (비밀번호) -e mariadb

터미널에 입력하면 cosmica DB에 있는 테이블 정보가 models에 자동 입력되어 nodejs 서버 실행시 cosmica에 테이블이 자동 생성됩니당

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant