inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

176만명의 커뮤니티!! 함께 토론해봐요.

EF로 만든 프로젝트를 개발서버에 올리니, 처음 로딩속도가 많이 느리네요.

미해결

ASP.NET Core MVC +ASP.NET Core +REST API +.NET 8.0

EF로 생성해서 개발서버에 올려놓았는데, 첫 로딩속도가 많이 느리네요. 개발사이트에 출근해서 접속하거나, IIS의 응용프로그램풀을 재시작후에 접근하면 5~6초 정도 걸립니다. 하지만 일단 연결이 되고 나면, 이후에는 1초 이내에 응답이 바로바로 옵니다. 접근도메인이 문제인가 싶어서, IP로 바꾸어도 동일하네요. 이런 현상이 나타나는 이유와, 해결 방법을 알고 싶습니다.

  • C#
  • mvc
  • rest-api
  • 아키텍처
  • mssql
  • ef-core
  • asp.net-core
darak 댓글 2 좋아요 0 조회수 230

citiList 의 더보기 버튼 함수

해결됨

한 번에 끝내는 자바스크립트: 바닐라 자바스크립트로 SPA 개발까지

안녕하세요 citiList 에 더보기 버튼이 있는데 handleLoadMore 함수가 더보기 버튼을 클릭했을 때 동작하는 함수인 것 이해했습니다. 근데 해당함수는 citiList 컴포넌트에서만 사용하니까 CitiList.js 에 작성할것으로 예상했는데 App.js 에 작성하셔서 App.js 에서 작성하고 CitiList 로 전달하는 이유가 궁금합니다!

  • javascript
  • rest-api
  • spa
  • dom
찹찹이 댓글 1 좋아요 1 조회수 159

강의 영상은 안나오고 소리만 나옵니다.

미해결

[리뉴얼] 처음하는 파이썬 백엔드와 웹기술 입문 (파이썬 중급, flask[플라스크] 로 이해하는 백엔드 및 웹기술 기본) [풀스택 Part1-1]

주피터 노트북 사용과 활용법 강의에 화면이 안나오고 자막과 소리만 나오네요. 다른 강의들도 좀 그런것 같은데 왜이런걸까요~?

  • python
  • rest-api
  • flask
gisub sim 댓글 1 좋아요 0 조회수 241

OneToOne Option OnDelete 작동

미해결

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

안녕하세요 코드팩토리님 NestJS에 관심이 생겨 최근 강의를 듣고 있습니다. OneToOne 에서 onDelete 설정을 했을 때 계속 profile이 null 값으로만 변경되는데 제 코드에 문제가 있는지 궁금합니다. 검토 한 번 부탁드려요. 감사합니다!! // user.entity.ts export class UserModel { // 자동으로 ID 생성 @PrimaryGeneratedColumn() id: number; @Column() email: string; @Column({ type: 'enum', enum: Role, default: Role.USER, }) role: Role; // 데이터가 생성되는 날짜와 시간이 자동으로 찍힌다. @CreateDateColumn() createdAt: Date; // 데이터가 업데이트되는 날짜와 시간이 자동으로 찍힌다. @UpdateDateColumn() updatedAt: Date; // 데이터가 업데이트 될 때마다 1씩 올라간다. // 처음 생성되면 값은 1이다. // save() 함수가 몇번 불렸는지 기억한다. @VersionColumn() version: number; @Column() @Generated('uuid') additionalId: string; ////////////// 이 부분 ///////////// @OneToOne(() => ProfileModel, (profile) => profile.user, { // find() 실행 할 때마다 항상 같이 가져올 relation을 정할 수 있다. eager: true, // 저장할 때 relation을 한번에 같이 저장 가능하게 한다. cascade: true, // null 값이 가능하게 한다. nullable: true, // on: ~했을 때 // 관계가 삭제 됐을 때 // no action => 아무것도 안함 // cascade => 참조하는 Row도 같이 삭제 // set null => 참조하는 Row에서 참조 id를 null로 변경 // set default => 기본 세팅으로 설정 (테이블의 기본 세팅) // restrict => 참조하고 있는 Row가 있는 경우 참조 당하는 Row 삭제 불가 onDelete: 'RESTRICT', }) profile: ProfileModel; ////////////// 이 부분 ///////////// @OneToMany(() => PostModel, (post) => post.author) posts: PostModel[]; } // app.controller.ts import { Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Role, UserModel } from './entity/user.entity'; import { Repository } from 'typeorm'; import { ProfileModel } from './entity/profile.entity'; import { PostModel } from './entity/post.entity'; import { TagModel } from './entity/tag.entity'; @Controller() export class AppController { constructor( @InjectRepository(UserModel) private readonly userRepository: Repository<UserModel>, @InjectRepository(ProfileModel) private readonly ProfileRepository: Repository<ProfileModel>, @InjectRepository(PostModel) private readonly PostRepository: Repository<PostModel>, @InjectRepository(TagModel) private readonly TagRepository: Repository<TagModel>, ) {} @Get('users') getUsers() { // OntToOne에 eager: true 설정을 하면 relations 옵션을 여기에서 넣어주지 않아도 된다. return this.userRepository.find({}); } @Delete('user/profile/:id') async deleteProfile(@Param('id') id: string) { await this.ProfileRepository.delete(+id); } @Post('user/profile') async createUserAndProfile() { const user = await this.userRepository.save({ email: 'asdf@naver.com', profile: { profileImg: 'asdf.jpg', }, }); // cascade: true 설정을 하면 relation을 한번에 같이 저장하게 되서 더 이상 두번 save 할 필요가 없음 // const profile = await this.ProfileRepository.save({ // profileImg: 'asdf.jpg', // user, // }); return user; } }

  • javascript
  • typescript
  • rest-api
  • nestjs
  • backend
abcwockd95 댓글 1 좋아요 0 조회수 71

강의노트 위치??

해결됨

[Qt/QML 실전 Part 2] C++ 개발자를 위한 실전 프로젝트 6종 (REST API)

강의노트는 어디서 볼수 있나요??

  • c++
  • rest-api
  • qt
  • qml
  • desktop-application
김준원 댓글 2 좋아요 0 조회수 197

현재 GIT에 올리신 소스를 실행해봤습니다.

미해결

[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발

현재 GIT에 올리신 소스를 실행해봤습니다. 그런데 시큐리티 비밀번호가 콘솔창에 뜨지 않습니다. 그리고 application.yml에서 시큐리티 관련 비밀번호 주석을 풀고 실행을 해도, rest api가 인증 없이도 호출되는 것 같습니다. 어떤 부분에서 설정이 빠진 것일까요?

  • rest-api
  • spring-boot
라벤더7 댓글 2 좋아요 0 조회수 253

input 태그 value문제 해결 방법

해결됨

한 번에 끝내는 자바스크립트: 바닐라 자바스크립트로 SPA 개발까지

초기값이 '' 이여서 강의에서는 value 값을 맨뒤로 넣고 input 태그에 닫힘을 작성하지 않음으로, 동작하게 하였는데 다른 방법으로는 <input type="text" placeholder="Search" id="search" value="${searchWord}" autocomplete="off"/> 로 작성하였습니다, value 를 싱글쿼터나 더블쿼터로 감싼다음 ${} 를 사용하시면, 뒤에다가 다른 속성을 넣거나 닫아도 정상 동작합니다. 참고 하실분 참고하셔도 좋습니다.

  • javascript
  • rest-api
  • spa
  • dom
hollis9797 댓글 1 좋아요 0 조회수 242

basic, bearer 토큰 관련 문의

미해결

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

안녕하세요 basic, bearer 토큰을 이미 범용적으로 널리 사용된다고 하셨는데 궁금한점이 로그인할 때 id/pw 를 header 에 넣어서 보낸다고 하셨는데 패킷을 탈취하면 너무 취약할 것 같아서요. 제가 웹개발자가 아니라 실무에선 실제로 어떻게 쓰는지 알고싶어서 질문남깁니다.

  • javascript
  • typescript
  • rest-api
  • nestjs
  • backend
김현철 댓글 2 좋아요 0 조회수 140

debug 강의 질문입니다.

미해결

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

강의 내용처럼 그대로 따라 했을 때 다음과 같이 됩니다. 1. 아래 사진 처럼 breakpoint 설정 시 빨간색이 아니라 빈원이 나옵니다. 실제 실행하였을 경우 break가 걸리긴 하는데 ts파일이 아닌 compile된 js 파일로 넘어갑니다. 인터넷 찾아보고 sourceMap 관련된거 같아서 tsconfig 파일에 sourceMap: true 넣고 launch.json에 sourceMaps: true 넣어봤는데도 변함이 없네요 어떤 부분을 확인해봐야할까요?

  • javascript
  • typescript
  • rest-api
  • nestjs
  • backend
gooejin21 댓글 3 좋아요 0 조회수 167

고양이 소리가 귀엽네요 !!

미해결

[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발

열심히 듣겠습니다 !!!!!

  • rest-api
  • spring-boot
Rain D 댓글 2 좋아요 0 조회수 188

9분 30초 || 'all' 영상 누락

해결됨

한 번에 끝내는 자바스크립트: 바닐라 자바스크립트로 SPA 개발까지

혹시나 기본 '/' 경로에서 펭귄눌렀다 popstate 로 뒤로갔을 경우 'clicked' css가 먹지않는 현상, 강의 내용에서 저부분이 영상 짤려서 놓치기 쉬울꺼 같습니다. 저도 강의보면서 하다가 || 'all' 하는 부분 제대로 보기힘들어서 못 적었다가 나중에 문제생겨서 로직 보다가 발견했습니다,

  • javascript
  • rest-api
  • spa
  • dom
hollis9797 댓글 2 좋아요 0 조회수 113

영상보고 직접 api를 구현해봤는데 자꾸 프로젝트를 변경하면 서버가 꺼지;는데 방법이 있을까요

해결됨

한 번에 끝내는 자바스크립트: 바닐라 자바스크립트로 SPA 개발까지

코드 관련 질문은 아래와 같이 '코드블럭' 기능을 이용해주세요! + 오류 메세지도 함께 올려주시면 좋아요 🙂 console.log('hello'); 이런식으로 구축했는데 프로젝트만 바꾸면 서버가 꺼져서요..

  • javascript
  • rest-api
  • spa
  • dom
용우 댓글 2 좋아요 0 조회수 152

08-06

미해결

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

docker-compose build가 안되요!ㅠㅠㅠㅠㅠ 도커라 도커컴포즈 삭제하고 다시 까는거는 5시간동안 했는데... 챗gpt가 하라는데로 5시간동안 했는데 해결이 안되네요! Traceback (most recent call last): File "urllib3/ connectionpool.py ", line 677, in urlopen File "urllib3/ connectionpool.py ", line 426, in make request File "<string>", line 3, in raise_from File "urllib3/ connectionpool.py ", line 421, in make request File "http/ client.py ", line 1369, in getresponse File "http/ client.py ", line 310, in begin File "http/ client.py ", line 271, in read status File " socket.py ", line 589, in readinto ConnectionResetError: [Errno 104] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "requests/ adapters.py ", line 449, in send File "urllib3/ connectionpool.py ", line 727, in urlopen File "urllib3/util/ retry.py ", line 410, in increment File "urllib3/packages/ six.py ", line 734, in reraise File "urllib3/ connectionpool.py ", line 677, in urlopen File "urllib3/ connectionpool.py ", line 426, in make request File "<string>", line 3, in raise_from File "urllib3/ connectionpool.py ", line 421, in make request File "http/ client.py ", line 1369, in getresponse File "http/ client.py ", line 310, in begin File "http/ client.py ", line 271, in read status File " socket.py ", line 589, in readinto urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "docker/api/ client.py ", line 214, in retrieve server_version File "docker/api/ daemon.py ", line 181, in version File "docker/utils/ decorators.py ", line 46, in inner File "docker/api/ client.py ", line 237, in _get File "requests/ sessions.py ", line 543, in get File "requests/ sessions.py ", line 530, in request File "requests/ sessions.py ", line 643, in send File "requests/ adapters.py ", line 498, in send requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "docker-compose", line 3, in <module> File "compose/cli/ main.py ", line 81, in main File "compose/cli/ main.py ", line 200, in perform_command File "compose/cli/ command.py ", line 70, in project_from_options File "compose/cli/ command.py ", line 153, in get_project File "compose/cli/docker_ client.py ", line 43, in get_client File "compose/cli/docker_ client.py ", line 170, in docker_client File "docker/api/ client.py ", line 197, in init File "docker/api/ client.py ", line 222, in retrieve server_version docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) [119730] Failed to execute script docker-compose 챗 gpt에 물어보고 똑같이 해봐도 해결이 안됩니다. ㅜㅜㅜㅜㅜ

  • javascript
  • node.js
  • docker
  • rest-api
  • nestjs
imhj11777 댓글 3 좋아요 0 조회수 232

구조랑 패턴 관련해서 질문

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

현재 실무에서 ORM(Prisma)을 채택해서 백엔드를 만들고 있어요. ORM으로 할 수록 Repository패턴과 조합이 좋지않다고 생각이 들고 실제 팀리더도 Repository패턴을 같이 쓰는거에 부정적이고 실제로 사용하지 않아요. 그렇다고 service 하나에 몰아 넣으니 저는 코드 읽기가 점점 힘들어지는거 같아요. 대체할만한걸 검색해보니 CQRS패턴이나 Query Object가 나오는데 아니면 서비스파일을 여러개 두거나... 강사님 같은 경우에는 실무에서 어떻게 대처하시는지 궁금합니다.

  • javascript
  • node.js
  • docker
  • rest-api
  • nestjs
Ref 댓글 2 좋아요 0 조회수 164

SqlConnection관련 질문

미해결

ASP.NET Core MVC +ASP.NET Core +REST API +.NET 8.0

SqlConnection이 deprecated 되었다고 뜨는데 이 부분은 상관없나요? 아니면 제가 잘못...선택을 한건지...ㅠqlConnection이 deprecated 되었다고 뜨는데 이 부분은 상관없나요? 이후 강의를 들으면서 따라가는데 차질이 생기는지 궁금합니다.

  • C#
  • mvc
  • rest-api
  • 아키텍처
  • mssql
  • ef-core
  • asp.net-core
qkrwluds7998 댓글 2 좋아요 0 조회수 173

경로 질문드립니다

해결됨

한 번에 끝내는 자바스크립트: 바닐라 자바스크립트로 SPA 개발까지

코드 관련 질문은 아래와 같이 '코드블럭' 기능을 이용해주세요! + 오류 메세지도 함께 올려주시면 좋아요 🙂 npm error code ENOENT npm error syscall open npm error path C:\Users\사용자이름\Desktop\animal_album_Main\animal_album-3\package.json npm error errno -4058 npm error enoent ENOENT: no such file or directory, open 'C:\Users\사용자이름\Desktop\animal_album_Main\animal_album-3\package.json' npm error enoent This is related to npm not being able to find a file. npm error enoent npm error A complete log of this run can be found in: C:\Users\사용자이름\AppData\Local\npm-cache\_logs\2024-12-06T08_26_22_967Z-debug-0.log 안녕하세요 질문드립니다 몇일동안 npm init 떄문에 질문드립니다 npm 설치시 해당 프로젝트 파일이 c드라이브 안에만 있어야 되는건가요 ? 1번 바탕화면에 프로젝트가 있을떄도 실행이 안됩니다 2번 c드라이브 -> User -> (사용자이름) -> github-> 해당 폴더 -> 프로젝트 폴더 3번 c드라이브 -> 프로젝트 폴더 3번일때만 되고 1,2번일때는 npm init 설치가 안되는데 2번도 가능하게 할려면 어떻게 해야하는지 궁금합니다

  • javascript
  • rest-api
  • spa
  • dom
서경진 댓글 2 좋아요 0 조회수 170

오류가 자꾸 발생하네요

미해결

원고 생성기 프로그램 개발 강의 (Chatgpt api)

안녕하세요 1강 수강 중에 이전 글에 올리신 분들과 같은 오류가 발생하여 기존 openai를 삭제한 후 openai==0.28.1 버전을 설치까지 했는데도 오류가 발생하네요.. 확인부탁드립니다. 위에 import 와 api_key값은 빼고 캡쳐한 화면 첨부드립니다.

  • python
  • rest-api
  • chatgpt
  • aiprm
sangheon kim 댓글 1 좋아요 0 조회수 168

git에서 소스받고 실습중인데

미해결

[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발

패스워드를 안넣어도 401에러가 아닌 200으로 올바른 API호출이 됩니다. SecurityConfig 없애고 하면 302로 login 페이지로 가고.. 혹시 어떤부분이 다를까요?

  • rest-api
  • spring-boot
zzang4355 댓글 1 좋아요 0 조회수 163

코드팩토리님, 강의 질문 있습니다.

미해결

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

패스트 캠퍼스에서 올린 강의에 대한 질문을 어디에 올려할지 모르겠어서 여기에 남깁니다. 아키텍처 대통합은 언제 올라나요?

  • javascript
  • typescript
  • rest-api
  • nestjs
  • backend
wooong 댓글 2 좋아요 0 조회수 166

regionList 에 region별 cities가 정상 로딩이 안됩니다.

해결됨

한 번에 끝내는 자바스크립트: 바닐라 자바스크립트로 SPA 개발까지

영상 7:53 부분에 코드를 완성하면, regionList에 있는 region 클릭 시, 영상처럼 region 별로 cities가 나와야 하지만, 아래 에러가 생겨서 정상적으로 로딩이 안됩니다. 혹시 어떤 문제 인지 알려주시면, 너무 고맙습니다. 감사합니다! app.js 코드는 아래와 같이 입력했습니다. import Header from "./components/Header.js"; import RegionList from "./components/RegionList.js"; import CityList from "./components/CityList.js"; import CityDetail from "./components/CityDetail.js"; import { request } from "./components/api.js"; export default function App($app) { const getSortBy = () => { if (window.location.search) { return window.location.search.split("sort=")[1].split("&")[0]; } return "total"; }; const getSearchWord = () => { if (window.location.search && window.location.search.includes("search=")) { return window.location.search.split("search=")[1]; } return ""; }; this.state = { startIdx: 0, sortBy: getSortBy(), searchWord: getSearchWord(), region: "", cities: "", }; const header = new Header({ $app, initialState: { sortBy: this.state.sortBy, searchWord: this.state.searchWord, }, handleSortChange: async (sortBy) => { const pageUrl = `/${this.state.region}?sort=${sortBy}`; history.pushState( null, null, this.state.searchWord ? pageUrl + `&search=${this.state.searchWord}` : pageUrl ); const cities = await request( 0, this.state.region, sortBy, this.state.searchWord ); this.setState({ ...this.state, startIdx: 0, sortBy: sortBy, cities: cities, }); }, handleSearch: async (searchWord) => { history.pushState( null, null, `/${this.state.region}?sort=${this.state.sortBy}&search=${searchWord}` ); const cities = await request( 0, this.state.region, this.state.sortBy, searchWord ); this.setState({ ...this.state, startIdx: 0, searchWord: searchWord, cities: cities, }); }, }); const regionList = new RegionList({ $app, initialState: this.state.region, handleRegion: async (region) => { history.pushState(null, null, `/${region}?sort=total`); const cities = await request(0, region, "total"); this.setState({ ...this.state, startIdx: 0, sortBy: "total", region: region, searchWord: "", cities: cities, }); }, }); const cityList = new CityList({ $app, initialState: this.state.cities, handleLoadMore: async () => { const newStartIdx = this.state.startIdx + 40; const newCities = await request( newStartIdx, this.state.region, this.state.sortBy, this.state.searchWord ); this.setState({ ...this.state, startIdx: newStartIdx, cities: { cities: [...this.state.cities.cities, ...newCities.cities], isEnd: newCities.isEnd, }, }); }, }); const cityDetail = new CityDetail(); this.setState = (newState) => { this.state = newState; cityList.setState(this.state.cities); header.setState({ sortBy: this.state.sortBy, searchWord: this.state.searchWord, }); regionList.setState(this.state.region); }; const init = async () => { const cities = await request( this.state.startIdx, this.state.region, this.state.sortBy, this.state.searchWord ); console.log(cities); this.setState({ ...this.state, cities: cities, }); }; init(); } regionList.js 코드는 아래와 같이 입력했습니다. export default function RegionList({ $app, initialState, handleRegion }) { this.state = initialState; this.$target = document.createElement("div"); this.$target.className = "region-list"; this.handleRegion = handleRegion; $app.appendChild(this.$target); this.template = () => { const regionList = [ "🚀 All", "🌏 Asia", "🕌 Middle-East", "🇪🇺 Europe", "💃 Latin-America", "🐘 Africa", "🏈 North-America", "🏄 Oceania", ]; let temp = ``; regionList.forEach((elm) => { let regionId = elm.split(" ")[1]; temp += `<div id=${regionId}>${elm}</div>`; }); return temp; }; this.render = () => { this.$target.innerHTML = this.template(); if (this.state) { let $currentRegion = document.getElementById(this.state); $currentRegion && ($currentRegion.className = "clicked"); } else { document.getElementById("All").className = "clicked"; } const $regionList = this.$target.querySelectorAll("div"); $regionList.forEach((elm) => { elm.addEventListener("click", () => { this.handleRegion(elm.id); }); }); }; this.setState = (newState) => { this.state = newState; this.render(); }; this.render(); }

  • javascript
  • rest-api
  • spa
  • dom
댓글 2 좋아요 1 조회수 206

인기 태그

인프런 TOP Writers

주간 인기글