python을 받는다 - 꼭 64비트로 받는다.


마이크로소프트 빌드툴 17을 설치한다.


pip install pandas


pip install pandas-datareader에서 오류가 나는데 

https://stackoverflow.com/questions/33785755/getting-could-not-find-function-xmlcheckversion-in-library-libxml2-is-libxml2

을 참고해서 라이브러리를 하나 설치하고 다시 시도한다.


Install lxml from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml for your python version. It's a precompiled WHL with required modules/dependencies.

The site lists several packages, when e.g. using Win32 Python 2.7, use lxml-3.6.1-cp27-cp27m-win32.whl.

Download the file, and then install with

pip install C:\path\to\downloaded\file\lxml-3.6.1-cp27-cp27m-win32.whl


Posted by 타다키치
,

Access-Control-Allow-Origin response header는 서버 응답이 주어진 origin에 공유될 수 있는지 지시해줌.


play에서는 개발 시 vue와 같은 별도의 FE 호출을 받도록 다음과 같이 설정해줌.


  cors { allowedOrigins = ["http://localhost:8080", "http://localhost:9000"] 

          allowedHttpMethods = ["GET", "POST", "PUT"]


methods에 POST를 포함시켜야 POST 호출을 받을 수 있음.


FE에서 호출 시에는 credential을 포함시켜야 cookie가 포함되서 서버에 들어온다.

서버에서 JWT(java web token)을 사용하는 경우 cookie가 들어와야 제 역할을 한다.


FE에서 fetch API를 쓸 때에는 다음과 같이 호출해야 쿠키가 포함된다.

fetch('/yyy/xxx', {
method: 'post',
credentials: 'include',
headers: {
'Csrf-Token': token
}

'include'로 하면 origin이 달라도 쿠키가 포함되며, 이를 'same-origin'으로 바꾸면 포트를 포함한 호스트가 같아야 API가 쿠키를 같이 보낸다.


axios는 기본이 same-origin인듯 하다.

Posted by 타다키치
,

dev에서는 image 등 정적 자원을 /static으로, proc에서는 /assets 으로 바라볼 때 dev가 개발 서버를 바라보도록 하려면


다음과 같이 config/index.js에서 

// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/assets': {
target: 'http://localhost:9000',
changeOrigin: true
}
},

와 같이 proxyTable을 설정해준다.

Posted by 타다키치
,