전체 글
-
06/11 mysql 다운로드 , select, insert데이터베이스 2021. 6. 11. 14:11
DB Mysql은 관계형 데이터베이스 몽고디비는 NoSQL 관령성을가지며 중복이 없는 데이터들의 집합 데이터베이스를 관리하는 시스템 DBMS mysql 다운로드 https://dev.mysql.com/downloads/installer/ MySQL :: Download MySQL Installer Select Operating System: Select Operating System… Microsoft Windows Select OS Version: All Windows (x86, 32-bit) Windows (x86, 32-bit), MSI Installer 8.0.25 2.4M (mysql-installer-web-community-8.0.25.0.msi) MD5: 7f64b7ca2c526c35991..
-
06/11 node.js 리퀘스트의 params, query확인게임 웹 프로그래밍/node.js 2021. 6. 11. 14:10
next함수 next('route') 리퀘스트의 params, query확인 :id req.params.id로 조회 가능 :type이면 req.params.type으로 조회 가능 const express = require("express"); const router = express.Router(); router.get("/:id", (req, res, next) => { console.log(req.params); console.log(req.query); res.send('검색'); }); module.exports = router; send 문자열, html코드, json데이터를 전송가능 sendFile 파일을 응답으로 보냄 우리가 http상태코드를 보낼 수 있음 res.status(404).sen..
-
06/10 node.js express를 사용한 rest api 연습게임 웹 프로그래밍/node.js 2021. 6. 10. 14:18
npm init -y npm i express uuid nodemon visual studio code 코드 정리 툴 prettier 파일 > 기본설정 > 설정 save검색 Formate On Save 체크설정 라우터 const userRouter = require("./routes/users"); app.use('/users', userRouter); 서버 할일 id를 생성 객체로 만들어서 배열에 추가 password 암호화 할수 있음 하기 npm crypto검색 jwttoken 응답시 status 200 오류시 500 app.js const express = require("express"); const userRouter = require("./routes/users"); const app = ex..
-
06/09 node.js게임 웹 프로그래밍/node.js 2021. 6. 9. 14:23
https://expressjs.com/ Express - Node.js web application framework Fast, unopinionated, minimalist web framework for Node.js $ npm install express --save expressjs.com 글로벌로 설치된 모듈 확인 npm list -g postman다운로드 https://www.postman.com/ Postman | The Collaboration Platform for API Development Postman makes API development easy. Our platform offers the tools to simplify each step of the API building p..
-
06/08 node.js게임 웹 프로그래밍/node.js 2021. 6. 8. 18:18
restfront.js function getUser() { console.log("getUser"); let xhr = new XMLHttpRequest(); xhr.onload = function() { if(xhr.status === 200) { let users = JSON.parse(xhr.responseText); let list = document.getElementById('list'); list.innerHTML = ''; Object.keys(users).map(function(key) { let userDiv = document.createElement('div'); let span = document.createElement('span'); span.textContent = user..
-
05/31 ~ 06/04 작업 요약개발일지/팀GC 2021. 6. 6. 04:42
05/31 로컬환경에서 node.js 서버와 MariaDB설치 순서 get메서드 브라우저 -> 로컬 node.js서버 ->로컬 DB ->로컬 node.js서버 -> 브라우저 출력 어려웠던점 post방식 리퀘스트로 본문에 json데이터를 보낼 시 json데이터를 활용할 수 있는 형식으로 바꿀 수 없었다. https://hijun1.tistory.com/161?category=864872 05/31 node.js 서버구축연습 2 node.js 서버에서 MariaDB에서 데이터 취득 후 콘솔창, 브라우저에 데이터 출력하기 1. MariaDB설치 https://downloads.mariadb.org/ Downloads - MariaDB downloads.mariadb.org 설치 참고 링크 https://jav..