Express, Vue Axios 연결
Vue를 Vue-cli로 설치하면 vue.config.js라는 파일이 생성이 되는데 거기서 module.exports = { devServer: { proxy: { '/api': { target: 'http://localhost:3000/api', changeOrigin: true, pathRewrite: { '^/api': '' } } } }, outputDir: '../express/public', } 이렇게 입력을 해주고 vue 위치에서 npm run build를 실행하면 express에 public폴더 구조가 바뀐다 Express에서 url : api/expenditure/month 에서 json으로 값을 받아온다 그럼 Vue에서는 npm i vue-router axios 명령어를 쳐서 route..
2020.04.24