정승호

all file uploaded

node_modules
\ No newline at end of file
const express = require('express')
const app = express()
const port = 5000
const mongoose = require('mongoose')
mongoose.connect('mongodb+srv://platoon07:wony9795!!@2020oss-ysxss.mongodb.net/test?retryWrites=true&w=majority',{
useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex : true, useFindAndModify: false
}).then(() => console.log('MongoDb connected....'))
.catch(err => console.log('Error'))
app.get('/', (req,res) => res.send('Hello world!!'))
app.listen(port, () => console.log('example app listen on port ${port} !'))
// mongodb+srv://platoon07:<password>@2020oss-ysxss.mongodb.net/test?retryWrites=true&w=majority
\ No newline at end of file
......
This diff is collapsed. Click to expand it.
......@@ -4,7 +4,7 @@
"description": ">20151039045 정승호",
"main": "index.js",
"scripts": {
"start":"node index.js" ,
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
......@@ -14,6 +14,7 @@
"author": "seungho",
"license": "ISC",
"dependencies": {
"express": "^4.17.1"
"express": "^4.17.1",
"mongoose": "^5.9.15"
}
}
......