Github에 AWS IP랑 키값 뿌려지는게 신경쓰여서 만들어놓고 key파일은 올리지 말아야지
key.js
const msID = '아이디';
const msPassWord = '비밀번호';
const msServer = '서버아이피';
const msDataBase = '데이터베이스 이름';
module.exports={
msID,
msPassWord,
msServer,
msDataBase,
};
app.js
const msdata = require('./key.js');
//사용할때
var ID = msdata.msID;
var PW = msdata.msPassWord;
.
.
.
이런식으로사용
'Node' 카테고리의 다른 글
Node.js API 만들기 GET 방식 (0) | 2021.02.05 |
---|---|
Node.js Http 서버 구축 (Https) (0) | 2021.02.05 |
Node.js MS-SQL 연동하기 (0) | 2021.02.04 |