import mongoose from "mongoose"; import app from "./app.js"; const port = 3000; mongoose .connect("mongodb://127.0.0.1:27017/test") .then((mgs) => { console.log(`버전 ${mgs.version} 몽구스 : 몽고디비가 접속되었습니다.`); app.listen(port, () =>{ console.log(`server is running at ${port} port. `); }) }) .catch((error) => { console.log(error); })