본문 바로가기

전체 글310

Node.js] 게시판 만들기5 // 댓글 기능 (findByIdAndUpdate) views/showpost.ejs 댓글 입력하는 곳과 저장된 댓글보여줌. 댓글 댓글 목록 2020. 2. 24.
GraphQL] 조건에 맞게 API 호출 // 영화 Api 활용 // 영화 json에서 검색 조건 적용 const {GraphQLServer} = require('graphql-yoga'); const fetch = require('node-fetch'); const API_URL = "https://yts.am/api/v2/list_movies.json?" const getMovies = (limit, rating) => { let REQUEST_URL = API_URL; // limit와 rating 조건에 맞는 결과 반환 console.log('limit ' + limit + ' ' + 'rating ' + rating); if (limit > 0) { REQUEST_URL += `limit=${limit}`; } if (rating > .. 2020. 2. 23.
GraphQL] 외부 API로 데이터 받아오기 https://yts.mx/api/v2/list_movies.json API Documentation - YTS YIFY Official YTS YIFY API documentation. YTS offers free API - an easy way to access the YIFY movies details. yts.mx REST API를 GraphQL API로 포장했다. index.js // 영화 Api 활용 const {GraphQLServer} = require('graphql-yoga'); const fetch = require('node-fetch'); const API_URL = "https://yts.am/api/v2/list_movies.json" const getMovies = (limi.. 2020. 2. 23.
GraphQL] 기본 개념 GraphQL : Query Language GraphQL: A query language for APIs. GraphQL provides a complete description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. graphql.org GraphQL 개념잡기 GraphQL은 페이스북에서 만든 쿼리 언어입니다. GrpahQL은 요즘 개발자들 사이에서 자주 입에 오르내리고 있으나, 2019년 7월 기준으로 얼리스테이지(ea.. 2020. 2. 22.
Node.js] Rest Api REST REpresentational State Transfer Node.js 웹개발로 알아보는 백엔드 자바스크립트의 이해 - 인프런 Node.js,의 핵심기능을 다루면서 백엔드에서 자바스크립트가 어떻게 동작하는지를 알아보고, Angular나 React와 같은 복잡한 애플리케이션 개발(SPA)에 필요한 back-end 핵심 요소를 다룹니다. 간결한 동영상들로 핵심적인 내용들을 빠르고 중요하게 다뤄 개발의 흐름을 익히고, 따라하는 실습으로 개발 경험을 쌓을 수 있습니다. 중급 웹 개발 Back End Javascript 온라인 강의 node-js-웹개발 www.inflearn.com REST 아키텍처를 훌륭하게 적용하기 위한 몇 가지 디자인 팁 최근의 서버 프로그램은 여러 웹 브라우저는 물론이며, 아이폰.. 2020. 2. 21.
Node.js] 네이버 블로그 rss // 가져올 네이버 블로그 RSS 주소 var RSS = "https://rss.blog.naver.com/~~.xml"; // 모듈 로드 var parseString = require('xml2js').parseString; var request = require('request'); // RSS 다운로드 ---- (※1) request(RSS, function (err, response, body) { if (!err && response.statusCode == 200) { analyzeRSS(body); } }); // RSS 해석 ---- (※2) function analyzeRSS(xml) { // XML을 JS 오브젝트로 변환 parseString(xml, function (err, obj).. 2020. 2. 18.