Heo

Html 초기화면 설정변경

......@@ -12,8 +12,12 @@ app.locals.pretty=true;
// app.set('view engine','pug');
app.use(express.static('public'));
var http = require('http');
var HTTPS = require('http');
var fs = require('fs');
const path = require('path');
const domain = "도메인 변경"
const sslport = 23023;
//?page=페이지번호&?perPage=페이지당 데이터수
const $base_url = `https://api.odcloud.kr/api/apnmOrg/v1/list`;
......@@ -96,3 +100,18 @@ app.listen(3000,function(){
console.log('Connected 3000 port!');
});
try {
const opion = {
ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
};
HTTPS.createServer(option, app).listen(sslport, () => {
console.log(`[HTTPS] Server is started on port ${sslport}`);
});
} catch (error) {
console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
console.log(error);
}
......
......@@ -30,7 +30,7 @@
</form>
</center>
<div id="map" style="width:1300px;height:750px; margin-left:100px; float:left; " ></div>
<div id="map" style="width:1300px;height:750px; margin-left:100px; float:left; border: 3px solid; " ></div>
<script type="text/javascript" src="https://dapi.kakao.com/v2/maps/sdk.js?appkey=35fccf4b4e2a3179187346f26ed3f988&libraries=services"></script>
<% if(typeof(info) != "undefined"){ %>
......@@ -138,7 +138,7 @@
geocoder.addressSearch(tmpaddr, function(result, status) {
if (status === kakao.maps.services.Status.OK) {
var coords = new kakao.maps.LatLng(result[0].y, result[0].x);
map.setCenter(coords);
map.setCenter(coords);
var marker = new kakao.maps.Marker({
position: coords,
clickable: true
......@@ -158,6 +158,16 @@
}
}
</script>
<% }else{ %>
<script>//입력 값이 없을 때 기본 지도 띄움
var mapContainer = document.getElementById('map'), // 지도를 표시할 div
mapOption = {
center: new kakao.maps.LatLng(37.596672, 127.051950), // 지도의 중심좌표
level: 3 // 지도의 확대 레벨
};
var map = new kakao.maps.Map(mapContainer, mapOption); // 지도를 생성합니다
</script>
<% } %>
</body>
</html>
\ No newline at end of file
......