본문 바로가기

TIL96

TIL D-83 MongoDB 1. 스키마와 모델 2. bodyParser 적용 3. 데이터 생성 -> 이부분이 저번에 따라 한 튜토리얼이랑 다른 느낌. 포스트맨으로 보내는데 시간이 좀 걸렸다. 프론트 전혀 없이 데이터만 주고 받는 방식. 스키마와 모델 스키마(schema) : 해당 컬렉션의 문서에 어떤 종류의 값이 들어가는지 정의 모델(model) : 스키마를 통해서 만드는 인스턴스 스키마 디자인 구상->코드 작성 const mongoose = require('mongoose'); const { Schema } = mongoose; const Author = new Schema({ name: String, email: String }); const Book = new Schema({ title: String, authors: [Au.. 2019. 11. 6.
TIL D-84 git config, crud 2탄 git contribution 반영이 안될 때, git config 파일에서 git username, email 을 변경함으로써 반영 가능! 여태 왜 커밋이 안되나 했다. git은 참 신기하다. https://webisfree.com/2018-07-26/git-config-%EC%84%A4%EC%A0%95-%ED%99%95%EC%9D%B8-%EB%B0%8F-%EB%B3%80%EA%B2%BD%ED%95%98%EA%B8%B0 git config 설정 확인 및 변경하기 git을 사용하는 경우 config 설정에 대한 내용을 볼 필요가 있습니다. 예를들어 사용자 이름이나 email 등을 확인할 수 도 있겠죠 webisfree.com 오늘 배운 것> 1. show, edit, update, delete 2. ej.. 2019. 11. 5.
Mozilla - javascript first steps In this module What is JavaScript? A first splash into JavaScript What went wrong? Troubleshooting JavaScript Storing the information you need — Variables Basic math in JavaScript — numbers and operators Handling text — strings in JavaScript Useful string methods Arrays Assessment: Silly story generator Silly story generator In this assessment you'll be tasked with taking some of the knowledge y.. 2019. 11. 5.
Mozilla - array #Printing those products! var list = document.querySelector('.output ul'); var totalBox = document.querySelector('.output p'); var total = 0; list.innerHTML = ''; totalBox.textContent = ''; var products = ['Underpants:6.99', //배열 만든다. 'Socks:5.99', 'T-shirt:14.99', 'Trousers:31.99', 'Shoes:23.99']; for(var i=0;i= 5) { myHistory.pop(); //마지막 자리에서 빼기 } // empty the search input and focus it, ready.. 2019. 11. 4.
Mozilla - useful string methods #대/소문자 맞게 수정하기 var list = document.querySelector('.output ul'); list.innerHTML = ''; var cities = ['lonDon', 'ManCHESTer', 'BiRmiNGHAM', 'liVERpoOL']; for(var i = 0; i 2019. 11. 4.
TIL D-85 CRUD/index, new, create 오늘 배운 것> 1. crud 7actions 2. index, new, create #7actions https://www.a-mean-blog.com/ko/blog/Node-JS-%EC%B2%AB%EA%B1%B8%EC%9D%8C/%EC%A3%BC%EC%86%8C%EB%A1%9D-%EB%A7%8C%EB%93%A4%EA%B8%B0/CRUD%EC%99%80-7-Standard-Actions Node JS 첫걸음/주소록 만들기: CRUD와 7 Standard Actions - A MEAN Blog CRUD CRUD(크러드)는 Create, Read, Update, Delete의 약어입니다. 말 그대로 데이터의 생성, 조회, 수정, 삭제가 가능함을 나타냅니다. 예를 들어, 주소록 프로그램에서 주소가 생성, 조.. 2019. 11. 4.