본문 바로가기 메뉴 바로가기

ABBO 기술 블로그

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

ABBO 기술 블로그

검색하기 폼
  • 분류 전체보기 (465)
    • AI Trend (2)
    • Git (12)
    • Server (242)
    • Client (69)
    • Apple (31)
    • Study (109)
  • 방명록

npm https (1)
Express cors 사용하기

이전 글에서 Java 에서 cors에 대해 설정하는 글이 있었다면, 이번에는 Node.js를 사용하여 서버를 구축했을 때의 cors 처리법을 기술해보고자 합니다. 가장 먼저 cors를 설치합니다. # http, express, cors 모듈 설치 $ npm install http express cors 1. 모두에게 허용하기 다음과 같이 cors를 설정하면 모두에게 허용이 됩니다. // index.js const http = require('http') const express = require('express') const app = express() const server = createServer(app) const cors = require('cors') const port = 8080 app.u..

Server 2021. 6. 14. 15:43
이전 1 다음
이전 다음
공지사항

Blog is powered by Tistory / Designed by Tistory

티스토리툴바