프로젝트
-
heroku로 React + json-sever 정적 웹 사이트 배포하기프로젝트 2023. 4. 15. 17:01
배포 순서 1. 폴더 구조 및 server 디렉토리 생성 1) 최상위에 Mock Api(json-server / json-server-auth)의 역할을 할 server 디렉토리를 생성한다. 2) 최상위에 db.json 이라는 파일을 만들어 db 역할을 할 데이터들을 json 형식으로 넣는다. 3) server 디렉토리로 이동해서 index.js 파일을 만들어 띄울 데이터 서버를 작성한다. const jsonServer = require("json-server") const auth = require("json-server-auth"); const path = require('path'); const app = jsonServer.create(); const router = jsonServer.route..
-
[사이드 프로젝트] 미니 와인 쇼핑몰프로젝트 2023. 4. 12. 14:39
프로젝트에서 고민하고 경험한 것들 1. Typescript Typescript에 대한 갈증과 열망이 많이 올라와있었다. 개인적으로도, 회사에서도 Javascript를 주 언어로 개발을 하다보니 '분명 배열 맞는데.. 왜 null 이라고하지?' '분명 타입이 맞는데 왜 에러가 발생하지?' 와 같은 에러 해결에 고초를 겪기도 했다. 이에 전 회사에서는 Typescript를 도입을 고려했으나, 이미 비대해져버리고 얽히고 섥힌 구조들을 변화시키는 건, 당시 우선순위가 아니었기에 회사에서는 사용하지 않았다. 따라서, 이번 사이드 프로젝트에 Typescript를 적용해보고 적극적으로 사용해보고자 한다. Typescript를 사용하는데 느꼈던 단점은, 생각보다 런닝 커브가 있고 처음에는 타입 체크 에러 때문에 개발을..