Commit 34bafb0c authored by baesangjune's avatar baesangjune
Browse files

Merge remote-tracking branch 'origin/cherry' into Sangjune

parents 5519f847 b873b1d4
[{"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\index.js":"1","C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\reportWebVitals.js":"2","C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\App.js":"3","C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\Search.js":"4","C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\Components\\Place.js":"5"},{"size":903,"mtime":1609294193427,"results":"6","hashOfConfig":"7"},{"size":375,"mtime":1609072355927,"results":"8","hashOfConfig":"7"},{"size":1411,"mtime":1609294197036,"results":"9","hashOfConfig":"7"},{"size":45798,"mtime":1609310256553,"results":"10","hashOfConfig":"7"},{"size":2147,"mtime":1609294052617,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"zqc0qw",{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\index.js",[],"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\App.js",["22","23"],"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\Search.js",[],"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\Components\\Place.js",["24"],{"ruleId":"25","severity":1,"message":"26","line":1,"column":17,"nodeType":"27","messageId":"28","endLine":1,"endColumn":26},{"ruleId":"25","severity":1,"message":"29","line":2,"column":10,"nodeType":"27","messageId":"28","endLine":2,"endColumn":14},{"ruleId":"25","severity":1,"message":"30","line":2,"column":33,"nodeType":"27","messageId":"28","endLine":2,"endColumn":36},"no-unused-vars","'useEffect' is defined but never used.","Identifier","unusedVar","'Link' is defined but never used.","'Col' is defined but never used."]
\ No newline at end of file
[{"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\index.js":"1","C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\reportWebVitals.js":"2","C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\App.js":"3","C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\Search.js":"4","C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\Components\\Place.js":"5"},{"size":903,"mtime":1609294193427,"results":"6","hashOfConfig":"7"},{"size":375,"mtime":1609072355927,"results":"8","hashOfConfig":"7"},{"size":1411,"mtime":1609294197036,"results":"9","hashOfConfig":"7"},{"size":37963,"mtime":1609720740562,"results":"10","hashOfConfig":"7"},{"size":2406,"mtime":1609720740553,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"zqc0qw",{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"22"},"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\index.js",[],"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\reportWebVitals.js",[],"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\App.js",["23","24"],"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\Search.js",[],"C:\\Users\\Korea\\Desktop\\2020winter\\search-page\\client\\src\\Components\\Place.js",["25"],"import React from 'react';\r\nimport { Modal, Container, Row, Col, Button } from 'react-bootstrap';\r\n\r\nfunction Place(props) {\r\n return (\r\n <>\r\n <style type=\"text/css\">\r\n {`\r\n .modal-backdrop.in {\r\n opacity: 0;\r\n }\r\n `}\r\n </style>\r\n <Modal {...props}\r\n size=\"lg\"\r\n keyboard=\"true\"\r\n variant=\"backdrop.in\"\r\n // show={lgShow}\r\n // onHide={() => setLgShow(false)}\r\n aria-labelledby=\"example-modal-sizes-title-lg\">\r\n <Modal.Header closeButton>\r\n <Modal.Title id=\"contained-modal-title-vcenter\">\r\n {props.search.name}\r\n </Modal.Title>\r\n </Modal.Header>\r\n <Modal.Body className=\"show-grid\">\r\n <Container>\r\n <Row className=\"mt-4\">\r\n <div>주도 전역을 지배하는 한라산은 남한에서 가장 높은 산으로 높이는 1,947.3m이다. 한라산이라는 이름은 산이 높아 산정에 서면 은하수를 잡아당길 수 있다는 뜻이며, 부악·원산·선산·두무악·영주산·부라산·혈망봉·여장군 등으로도 불려왔다.</div>\r\n <a href=\"https://www.daum.net\">다음의 블로그</a>\r\n </Row>\r\n <Row className=\"mt-4\">\r\n <div>한라산은 1966년 한라산 천연보호구역으로, 1970년 국립공원으로 지정되었다. 그리고 2002년에는 유네스코 생물권보전지역으로 지정되었으며 2007년에는 유네스코 세계자연유산으로 등재되었다. 2008년에는 물장오리오름 산정화구호 습지가 람사르 습지로 등록되어 보호 관리되고 있다</div>\r\n <a href=\"https://www.naver.com/\">네이버의 블로그</a>\r\n </Row>\r\n <Row className=\"mt-4\">\r\n <div>한라산은 제주도에 있는 해발 1,947.06m, 면적 약 1,820km²의 화산으로, 제주도의 면적 대부분을 차지하고 있다. 정상에 백록담이라는 화산호가 있는데, 백록담이라는 이름은 흰 사슴이 물을 먹는 곳이라는 뜻에서 왔다고 전해진다.</div>\r\n <a href=\"https://www.google.com/\">구글의 블로그</a></Row>\r\n </Container>\r\n </Modal.Body>\r\n <Modal.Footer>\r\n <Button onClick={props.onHide}>Close</Button>\r\n </Modal.Footer>\r\n </Modal>\r\n </>\r\n );\r\n}\r\n\r\nexport default Place;",{"ruleId":"26","severity":1,"message":"27","line":1,"column":17,"nodeType":"28","messageId":"29","endLine":1,"endColumn":26},{"ruleId":"26","severity":1,"message":"30","line":2,"column":10,"nodeType":"28","messageId":"29","endLine":2,"endColumn":14},{"ruleId":"26","severity":1,"message":"31","line":2,"column":33,"nodeType":"28","messageId":"29","endLine":2,"endColumn":36},"no-unused-vars","'useEffect' is defined but never used.","Identifier","unusedVar","'Link' is defined but never used.","'Col' is defined but never used."]
\ No newline at end of file
......@@ -3,8 +3,18 @@ import { Modal, Container, Row, Col, Button } from 'react-bootstrap';
function Place(props) {
return (
<>
<style type="text/css">
{`
.modal-backdrop.in {
opacity: 0;
}
`}
</style>
<Modal {...props}
size="lg"
keyboard="true"
variant="backdrop.in"
// show={lgShow}
// onHide={() => setLgShow(false)}
aria-labelledby="example-modal-sizes-title-lg">
......@@ -32,6 +42,7 @@ function Place(props) {
<Button onClick={props.onHide}>Close</Button>
</Modal.Footer>
</Modal>
</>
);
}
......
This diff is collapsed.
import mongoose from 'mongoose'
const { String, ObjectId } = mongoose.Schema.Types
const PlaceSchema = new mongoose.Schema({
name: {
type: String,
required: true,
},
address: {
type: String,
required: true,
unique: true,
},
img: {
type: String,
required: true,
default: "https://t1.daumcdn.net/thumb/R600x0/?fname=http%3A%2F%2Ft1.daumcdn.net%2Fqna%2Fimage%2F4b035cdf8372d67108f7e8d339660479dfb41bbd",
},
time: {
type: Array,
required: true,
},
review: {
type: ObjectId,
ref: 'Review'
}
}, {
timestamps: true
})
export default mongoose.models.Place || mongoose.model('Place', PlaceSchema)
\ No newline at end of file
import mongoose from 'mongoose'
const { String } = mongoose.Schema.Types
const ReviewSchema = new mongoose.Schema({
link: {
type: String,
required: true,
},
address: {
type: String,
required: true,
unique: true,
},
imag: {
type: String,
required: true,
default: "https://t1.daumcdn.net/thumb/R600x0/?fname=http%3A%2F%2Ft1.daumcdn.net%2Fqna%2Fimage%2F4b035cdf8372d67108f7e8d339660479dfb41bbd",
},
time: {
type: Array,
required: true,
},
}, {
timestamps: true
})
export default mongoose.models.Review || mongoose.model('Review', ReviewSchema)
\ No newline at end of file
import express from 'express'
import connectDb from './utils/connectDb.js'
import placeRouter from './routes/place.routes.js'
const app = express()
app.get('/', (req, res) => {
res.send('Hello')
})
app.get('/home', (req, res) => {
res.send('Home page')
})
app.use(express.json())
app.put('/signin', (req, res) => {
res.send('Sign in')
})
app.use(placeRouter)
app.listen(3001, () => {
console.log('Server is listening on port 3001')
......
import mongoose from 'mongoose'
import config from '../config.js'
const connection = {}
async function connectDb() {
if (connection.isConnected) {
return
}
const db = await mongoose.connect(config.mongoDburi, {
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
useCreateIndex: true
})
connection.isConnected = db.connections[0].readyState
}
export default connectDb
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment