Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김서연
/
Corona_Vaccination_Medical_Institution
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Heo
2021-06-05 23:43:27 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
26de9ea764439da64ef140eb899fffb04071e695
26de9ea7
1 parent
4504eed3
Html 초기화면 설정변경
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
app.js
views/index.ejs
app.js
View file @
26de9ea
...
...
@@ -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
);
}
...
...
views/index.ejs
View file @
26de9ea
...
...
@@ -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"){ %>
...
...
@@ -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
...
...
Please
register
or
login
to post a comment