구글드라이브 / google drive : https://drive.google.com/drive/folders/1dj8TfcDCeaLoRzHU5YRlBJoUgh4AcBdg?usp=drive_link
-nodejs디렉토리 내에 package.json은 설치된 모듈 리스트입니다.
package.json in the nodejs directory is a list of installed modules.
-server1.js는 nodejs서버 부분입니다.
server1.js is the nodejs server part.
-public/login.ejs 파일은 ejs파일로 로그인 폼에 해당하는 부분입니다.
The public/login.ejs file is an ejs file that corresponds to the login form.
1.모듈설치 / module install
– nodejs디렉토리를 다운 받아서 쉘(또는 명령프롬프트)에서 nodejs디렉토리로 이동후에 package.json파일을 열고 모듈설치를 진행합니다.
Download the nodejs directory, move to the nodejs directory in the shell (or command prompt), open the package.json file, and proceed with module installation.
– 굵은 글씨로 표시된 부분을 npm install bcrypt 이렇게 설치 하시면 됩니다.
You can install the part marked in bold by running npm install bcrypt.
{
"name": "login",
"version": "1.0.0",
"description": "login array",
"main": "server1.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "daekyeong kim",
"license": "MIT",
"dependencies": {
"bcrypt": "^5.1.1",
"express": "^5.1.0",
"express-session": "^1.18.1"
}
}
2.서버실행
– 해당 디렉토리 내에서 node server1.js를 실행합니다.
Run node server1.js inside that directory.
-브라우저에서 localhost:3000을 실행하면 다음과 같은 화면이 실행되면 정상 입니다.
If you run localhost:3000 from the browser and the following screen appears, it is normal.
-id는 testuser이고 password는 11111111입니다.
id is testuser and password is 11111111.
